From 764f01dee293bb1c785d2a1d18a197bc2e0007f3 Mon Sep 17 00:00:00 2001 From: Kirill Andreev Date: Tue, 24 Mar 2009 19:46:26 +0300 Subject: [PATCH] Dot11s prefix removed --- src/devices/mesh/dot11s/dot11s-helper.cc | 2 +- src/devices/mesh/dot11s/peer-link.cc | 2 +- src/devices/mesh/dot11s/peer-link.h | 4 +- .../mesh/dot11s/peer-manager-plugin.cc | 16 +++--- src/devices/mesh/dot11s/peer-manager-plugin.h | 12 ++--- .../mesh/dot11s/peer-manager-protocol.cc | 54 +++++++++---------- .../mesh/dot11s/peer-manager-protocol.h | 10 ++-- 7 files changed, 50 insertions(+), 50 deletions(-) diff --git a/src/devices/mesh/dot11s/dot11s-helper.cc b/src/devices/mesh/dot11s/dot11s-helper.cc index 9d6221165..6e69a8c53 100644 --- a/src/devices/mesh/dot11s/dot11s-helper.cc +++ b/src/devices/mesh/dot11s/dot11s-helper.cc @@ -153,7 +153,7 @@ MeshWifiHelper::Install (const WifiPhyHelper &phyHelper, NodeContainer c) const mac->SetAddress (Mac48Address::Allocate ()); device->SetMac (mac); device->SetPhy (phy); - Ptr peerMan = m_peerMan.Create (); + Ptr peerMan = m_peerMan.Create (); NS_ASSERT(peerMan->AttachPorts(ports)); device->SetRemoteStationManager (manager); node->AddDevice (device); diff --git a/src/devices/mesh/dot11s/peer-link.cc b/src/devices/mesh/dot11s/peer-link.cc index a4083231e..e15c1ae97 100644 --- a/src/devices/mesh/dot11s/peer-link.cc +++ b/src/devices/mesh/dot11s/peer-link.cc @@ -251,7 +251,7 @@ PeerLink::LinkIsIdle () const return (m_state == IDLE); } void -PeerLink::SetMacPlugin(Ptr plugin) +PeerLink::SetMacPlugin(Ptr plugin) { m_macPlugin = plugin; } diff --git a/src/devices/mesh/dot11s/peer-link.h b/src/devices/mesh/dot11s/peer-link.h index 452ce624f..85ef44422 100644 --- a/src/devices/mesh/dot11s/peer-link.h +++ b/src/devices/mesh/dot11s/peer-link.h @@ -131,7 +131,7 @@ public: * Set pointer to MAC-plugin, which is responsible for sending peer * link management frames */ - void SetMacPlugin(Ptr plugin); + void SetMacPlugin(Ptr plugin); private: /// Peer link states, see 802.11s draft 11B.3.3.1 enum PeerState { @@ -199,7 +199,7 @@ private: ///The number of interface I am associated with uint32_t m_interface; /// pointer to mac plugin, which is responsible for peer management - Ptr m_macPlugin; + Ptr m_macPlugin; /// Peer address Mac48Address m_peerAddress; /// My ID of this link diff --git a/src/devices/mesh/dot11s/peer-manager-plugin.cc b/src/devices/mesh/dot11s/peer-manager-plugin.cc index 43ed83478..ff7c96865 100644 --- a/src/devices/mesh/dot11s/peer-manager-plugin.cc +++ b/src/devices/mesh/dot11s/peer-manager-plugin.cc @@ -32,24 +32,24 @@ NS_LOG_COMPONENT_DEFINE("PeerManager"); namespace ns3 { namespace dot11s { -Dot11sPeerManagerMacPlugin::Dot11sPeerManagerMacPlugin (uint32_t interface, Ptr protocol) +PeerManagerMacPlugin::PeerManagerMacPlugin (uint32_t interface, Ptr protocol) { m_ifIndex = interface; m_protocol = protocol; } -Dot11sPeerManagerMacPlugin::~Dot11sPeerManagerMacPlugin () +PeerManagerMacPlugin::~PeerManagerMacPlugin () { } void -Dot11sPeerManagerMacPlugin::SetParent (Ptr parent) +PeerManagerMacPlugin::SetParent (Ptr parent) { m_parent = parent; } bool -Dot11sPeerManagerMacPlugin::Receive (Ptr const_packet, const WifiMacHeader & header) +PeerManagerMacPlugin::Receive (Ptr const_packet, const WifiMacHeader & header) { Ptr packet = const_packet->Copy(); if(header.IsBeacon()) @@ -134,13 +134,13 @@ Dot11sPeerManagerMacPlugin::Receive (Ptr const_packet, const WifiMacHead } bool -Dot11sPeerManagerMacPlugin::UpdateOutcomingFrame (Ptr packet, WifiMacHeader & header, Mac48Address from, Mac48Address to) const +PeerManagerMacPlugin::UpdateOutcomingFrame (Ptr packet, WifiMacHeader & header, Mac48Address from, Mac48Address to) const { return false; } void -Dot11sPeerManagerMacPlugin::UpdateBeacon (MeshWifiBeacon & beacon) const +PeerManagerMacPlugin::UpdateBeacon (MeshWifiBeacon & beacon) const { Ptr beaconTiming = m_protocol->SendBeacon( @@ -150,7 +150,7 @@ Dot11sPeerManagerMacPlugin::UpdateBeacon (MeshWifiBeacon & beacon) const beacon.AddInformationElement(beaconTiming); } void -Dot11sPeerManagerMacPlugin::SendPeerLinkManagementFrame( +PeerManagerMacPlugin::SendPeerLinkManagementFrame( Mac48Address peerAddress, uint16_t aid, IeDot11sPeerManagement peerElement, @@ -208,7 +208,7 @@ Dot11sPeerManagerMacPlugin::SendPeerLinkManagementFrame( m_parent->SendManagementFrame(packet, hdr); } Mac48Address -Dot11sPeerManagerMacPlugin::GetAddress () const +PeerManagerMacPlugin::GetAddress () const { if(m_parent != 0) return m_parent->GetAddress (); diff --git a/src/devices/mesh/dot11s/peer-manager-plugin.h b/src/devices/mesh/dot11s/peer-manager-plugin.h index 30ef6b323..5b7d34291 100644 --- a/src/devices/mesh/dot11s/peer-manager-plugin.h +++ b/src/devices/mesh/dot11s/peer-manager-plugin.h @@ -29,7 +29,7 @@ class MeshWifiInterfaceMac; namespace dot11s { class IeDot11sConfiguration; class IeDot11sPeerManagement; -class Dot11sPeerManagerProtocol; +class PeerManagerProtocol; /** * \ingroup dot11s * @@ -39,11 +39,11 @@ class Dot11sPeerManagerProtocol; * element and mesh configuration element and passes it to main part * of protocol */ -class Dot11sPeerManagerMacPlugin : public MeshWifiInterfaceMacPlugin +class PeerManagerMacPlugin : public MeshWifiInterfaceMacPlugin { public: - Dot11sPeerManagerMacPlugin (uint32_t interface, Ptr protocol); - ~Dot11sPeerManagerMacPlugin (); + PeerManagerMacPlugin (uint32_t interface, Ptr protocol); + ~PeerManagerMacPlugin (); /** * \brief Inherited from plugin abstract class * \{ @@ -55,7 +55,7 @@ public: /** * \} */ - void SetPeerManagerProtcol(Ptr protocol); + void SetPeerManagerProtcol(Ptr protocol); void SendPeerLinkManagementFrame( Mac48Address peerAddress, uint16_t aid, @@ -74,7 +74,7 @@ private: */ Ptr m_parent; uint32_t m_ifIndex; - Ptr m_protocol; + Ptr m_protocol; /** * \} */ diff --git a/src/devices/mesh/dot11s/peer-manager-protocol.cc b/src/devices/mesh/dot11s/peer-manager-protocol.cc index 1f276a390..62c011fa2 100644 --- a/src/devices/mesh/dot11s/peer-manager-protocol.cc +++ b/src/devices/mesh/dot11s/peer-manager-protocol.cc @@ -33,32 +33,32 @@ #include "peer-manager-plugin.h" -NS_LOG_COMPONENT_DEFINE ("Dot11sPeerManagerProtocol"); +NS_LOG_COMPONENT_DEFINE ("PeerManagerProtocol"); namespace ns3 { namespace dot11s { /*************************************************** * PeerManager ***************************************************/ -NS_OBJECT_ENSURE_REGISTERED (Dot11sPeerManagerProtocol); +NS_OBJECT_ENSURE_REGISTERED (PeerManagerProtocol); TypeId -Dot11sPeerManagerProtocol::GetTypeId (void) +PeerManagerProtocol::GetTypeId (void) { - static TypeId tid = TypeId ("ns3::Dot11sPeerManagerProtocol") + static TypeId tid = TypeId ("ns3::PeerManagerProtocol") .SetParent () - .AddConstructor () + .AddConstructor () //peerLinkCleanupTimeout. This constant is not specified in Draft 2.0 .AddAttribute ("PeerLinkCleanupPeriod", "PeerLinkCleanupPeriod", TimeValue (MilliSeconds (80)), - MakeTimeAccessor (&Dot11sPeerManagerProtocol::m_peerLinkCleanupPeriod), + MakeTimeAccessor (&PeerManagerProtocol::m_peerLinkCleanupPeriod), MakeTimeChecker () ) //MaxBeaconLost. This constant is not specified in Draft 2.0 #if 0 .AddAttribute ("MaxBeaconLost", "Max Beacon Lost", UintegerValue (3), - MakeUintegerAccessor (&Dot11sPeerManagerProtocol::m_maxBeaconLoss), + MakeUintegerAccessor (&PeerManagerProtocol::m_maxBeaconLoss), MakeUintegerChecker () ) #endif @@ -66,20 +66,20 @@ Dot11sPeerManagerProtocol::GetTypeId (void) .AddAttribute ("MaxNumberOfPeerLinks", "Maximum number of peer links ", UintegerValue (32), - MakeUintegerAccessor (&Dot11sPeerManagerProtocol::m_maxNumberOfPeerLinks), + MakeUintegerAccessor (&PeerManagerProtocol::m_maxNumberOfPeerLinks), MakeUintegerChecker () ); return tid; } -Dot11sPeerManagerProtocol::Dot11sPeerManagerProtocol (): +PeerManagerProtocol::PeerManagerProtocol (): m_lastAssocId (0), m_lastLocalLinkId (1), m_numberOfActivePeers (0) { - m_cleanupEvent = Simulator::Schedule (m_peerLinkCleanupPeriod, &Dot11sPeerManagerProtocol::PeerCleanup, this); + m_cleanupEvent = Simulator::Schedule (m_peerLinkCleanupPeriod, &PeerManagerProtocol::PeerCleanup, this); } -Dot11sPeerManagerProtocol::~Dot11sPeerManagerProtocol () +PeerManagerProtocol::~PeerManagerProtocol () { m_cleanupEvent.Cancel (); //TODO: delete a list of descriptors @@ -103,14 +103,14 @@ Dot11sPeerManagerProtocol::~Dot11sPeerManagerProtocol () } bool -Dot11sPeerManagerProtocol::AttachPorts(std::vector > interfaces) +PeerManagerProtocol::AttachPorts(std::vector > interfaces) { for(std::vector >::iterator i = interfaces.begin(); i != interfaces.end(); i ++) { MeshWifiInterfaceMac * mac = dynamic_cast (PeekPointer ((*i)->GetMac ())); if (mac == NULL) return false; - Ptr peerPlugin = Create ((*i)->GetIfIndex(), this); + Ptr peerPlugin = Create ((*i)->GetIfIndex(), this); mac->InstallPlugin(peerPlugin); m_plugins[(*i)->GetIfIndex()] = peerPlugin; PeerLinksOnInterface newmap; @@ -120,7 +120,7 @@ Dot11sPeerManagerProtocol::AttachPorts(std::vector > interfac } Ptr -Dot11sPeerManagerProtocol::SendBeacon(uint32_t interface, Time currentTbtt, Time beaconInterval) +PeerManagerProtocol::SendBeacon(uint32_t interface, Time currentTbtt, Time beaconInterval) { Ptr retval = Create (); BeaconInfoMap::iterator i = m_neighbourBeacons.find(interface); @@ -141,7 +141,7 @@ Dot11sPeerManagerProtocol::SendBeacon(uint32_t interface, Time currentTbtt, Time return retval; } void -Dot11sPeerManagerProtocol::FillBeaconInfo(uint32_t interface, Mac48Address peerAddress, Time receivingTime, Time beaconInterval) +PeerManagerProtocol::FillBeaconInfo(uint32_t interface, Mac48Address peerAddress, Time receivingTime, Time beaconInterval) { BeaconInfoMap::iterator i = m_neighbourBeacons.find(interface); if(i == m_neighbourBeacons.end()) @@ -169,7 +169,7 @@ Dot11sPeerManagerProtocol::FillBeaconInfo(uint32_t interface, Mac48Address peerA } void -Dot11sPeerManagerProtocol::ReceiveBeacon( +PeerManagerProtocol::ReceiveBeacon( uint32_t interface, bool meshBeacon, IeDot11sBeaconTiming timingElement, @@ -202,7 +202,7 @@ Dot11sPeerManagerProtocol::ReceiveBeacon( } void -Dot11sPeerManagerProtocol::ReceivePeerLinkFrame ( +PeerManagerProtocol::ReceivePeerLinkFrame ( uint32_t interface, Mac48Address peerAddress, uint16_t aid, @@ -270,7 +270,7 @@ Dot11sPeerManagerProtocol::ReceivePeerLinkFrame ( } void -Dot11sPeerManagerProtocol::ConfigurationMismatch ( +PeerManagerProtocol::ConfigurationMismatch ( uint32_t interface, Mac48Address peerAddress ) @@ -288,7 +288,7 @@ Dot11sPeerManagerProtocol::ConfigurationMismatch ( } Ptr -Dot11sPeerManagerProtocol::InitiateLink ( +PeerManagerProtocol::InitiateLink ( uint32_t interface, Mac48Address peerAddress, Time lastBeacon, @@ -323,12 +323,12 @@ Dot11sPeerManagerProtocol::InitiateLink ( new_link->SetPeerAddress (peerAddress); new_link->SetBeaconInformation (lastBeacon, beaconInterval); new_link->SetMacPlugin (plugin->second); - new_link->MLMESetSignalStatusCallback (MakeCallback(&Dot11sPeerManagerProtocol::PeerLinkStatus, this)); + new_link->MLMESetSignalStatusCallback (MakeCallback(&PeerManagerProtocol::PeerLinkStatus, this)); iface->second.push_back (new_link); return new_link; } void -Dot11sPeerManagerProtocol::PeerCleanup () +PeerManagerProtocol::PeerCleanup () { //Cleanup a peer link descriptors: for ( @@ -350,10 +350,10 @@ Dot11sPeerManagerProtocol::PeerCleanup () j->second.erase (j->second.begin() + to_erase[i]); to_erase.clear (); } - m_cleanupEvent = Simulator::Schedule (m_peerLinkCleanupPeriod, &Dot11sPeerManagerProtocol::PeerCleanup, this); + m_cleanupEvent = Simulator::Schedule (m_peerLinkCleanupPeriod, &PeerManagerProtocol::PeerCleanup, this); } bool -Dot11sPeerManagerProtocol::IsActiveLink (uint32_t interface, Mac48Address peerAddress) +PeerManagerProtocol::IsActiveLink (uint32_t interface, Mac48Address peerAddress) { PeerLinksMap::iterator iface = m_peerLinks.find (interface); NS_ASSERT (iface != m_peerLinks.end()); @@ -363,14 +363,14 @@ Dot11sPeerManagerProtocol::IsActiveLink (uint32_t interface, Mac48Address peerAd return false; } bool -Dot11sPeerManagerProtocol::ShouldSendOpen (uint32_t interface, Mac48Address peerAddress) +PeerManagerProtocol::ShouldSendOpen (uint32_t interface, Mac48Address peerAddress) { if (m_numberOfActivePeers > m_maxNumberOfPeerLinks) return false; return true; } bool -Dot11sPeerManagerProtocol::ShouldAcceptOpen (uint32_t interface, Mac48Address peerAddress, dot11sReasonCode & reasonCode) +PeerManagerProtocol::ShouldAcceptOpen (uint32_t interface, Mac48Address peerAddress, dot11sReasonCode & reasonCode) { if (m_numberOfActivePeers > m_maxNumberOfPeerLinks) { @@ -381,7 +381,7 @@ Dot11sPeerManagerProtocol::ShouldAcceptOpen (uint32_t interface, Mac48Address pe } #if 0 Time -Dot11sPeerManagerProtocol::GetNextBeaconShift ( +PeerManagerProtocol::GetNextBeaconShift ( Mac48Address interfaceAddress, Time myNextTBTT ) @@ -464,7 +464,7 @@ Dot11sPeerManagerProtocol::GetNextBeaconShift ( #endif void -Dot11sPeerManagerProtocol::PeerLinkStatus (uint32_t interface, Mac48Address peerAddress, bool status) +PeerManagerProtocol::PeerLinkStatus (uint32_t interface, Mac48Address peerAddress, bool status) { PeerManagerPluginMap::iterator plugin = m_plugins.find (interface); NS_LOG_UNCOND(interface); diff --git a/src/devices/mesh/dot11s/peer-manager-protocol.h b/src/devices/mesh/dot11s/peer-manager-protocol.h index ae0922e9e..7f7eea0a6 100644 --- a/src/devices/mesh/dot11s/peer-manager-protocol.h +++ b/src/devices/mesh/dot11s/peer-manager-protocol.h @@ -34,16 +34,16 @@ #include namespace ns3 { namespace dot11s { -class Dot11sPeerManagerMacPlugin; +class PeerManagerMacPlugin; class PeerLink; /** * \ingroup dot11s */ -class Dot11sPeerManagerProtocol : public Object +class PeerManagerProtocol : public Object { public: - Dot11sPeerManagerProtocol (); - ~Dot11sPeerManagerProtocol (); + PeerManagerProtocol (); + ~PeerManagerProtocol (); static TypeId GetTypeId (); bool AttachPorts(std::vector >); /** \brief Methods that handle beacon sending/receiving procedure. @@ -134,7 +134,7 @@ private: typedef std::map PeerLinksMap; typedef std::map BeaconsOnInterface; typedef std::map BeaconInfoMap; - typedef std::map > PeerManagerPluginMap; + typedef std::map > PeerManagerPluginMap; private: /** * Return a position in beacon-storage for a given remote station