diff -r d6e168eba404 -r 5688b8da4526 src/devices/mesh/dot11s/dot11s-installer.cc --- a/src/devices/mesh/dot11s/dot11s-installer.cc Wed Jul 22 13:31:31 2009 +0400 +++ b/src/devices/mesh/dot11s/dot11s-installer.cc Wed Jul 22 14:52:42 2009 +0400 @@ -22,7 +22,8 @@ #include "peer-management-protocol.h" #include "hwmp-protocol.h" -namespace ns3 { +namespace ns3 +{ using namespace dot11s; NS_OBJECT_ENSURE_REGISTERED (Dot11sStack); TypeId @@ -30,14 +31,15 @@ { static TypeId tid = TypeId ("ns3::Dot11sStack") .SetParent () - .AddConstructor () - ; + .AddConstructor (); return tid; } Dot11sStack::Dot11sStack () -{} +{ +} Dot11sStack::~Dot11sStack () -{} +{ +} void Dot11sStack::DoDispose () { @@ -45,16 +47,16 @@ void Dot11sStack::SetRoot (Ptr mp) { - Ptr hwmp = mp->GetObject (); - NS_ASSERT(hwmp != 0); - hwmp->SetRoot (); + Ptr hwmp = mp->GetObject (); + NS_ASSERT (hwmp != 0); + hwmp->SetRoot (); } bool Dot11sStack::InstallStack (Ptr mp) { //Install Peer management protocol: Ptr pmp = CreateObject (); - pmp->SetMeshId("mesh"); + pmp->SetMeshId ("mesh"); bool install_ok = pmp->Install (mp); if (!install_ok) { @@ -68,27 +70,27 @@ return false; } //Install interaction between HWMP and Peer management protocol: - pmp->SetPeerLinkStatusCallback (MakeCallback(&HwmpProtocol::PeerLinkStatus, hwmp)); - hwmp->SetNeighboursCallback (MakeCallback(&PeerManagementProtocol::GetActiveLinks, pmp)); + pmp->SetPeerLinkStatusCallback (MakeCallback (&HwmpProtocol::PeerLinkStatus, hwmp)); + hwmp->SetNeighboursCallback (MakeCallback (&PeerManagementProtocol::GetActiveLinks, pmp)); return true; } void Dot11sStack::Report (const Ptr mp, std::ostream& os) { mp->Report (os); - + std::vector > ifaces = mp->GetInterfaces (); for (std::vector >::const_iterator i = ifaces.begin (); i != ifaces.end (); ++i) - { - Ptr device = (*i)->GetObject (); - NS_ASSERT (device != 0); - MeshInterfaceHelper::Report (device, os); - } - Ptr hwmp = mp->GetObject (); + { + Ptr device = (*i)->GetObject (); + NS_ASSERT (device != 0); + MeshInterfaceHelper::Report (device, os); + } + Ptr hwmp = mp->GetObject (); NS_ASSERT (hwmp != 0); hwmp->Report (os); - Ptr pmp = mp->GetObject (); + Ptr pmp = mp->GetObject (); NS_ASSERT (pmp != 0); pmp->Report (os); } @@ -96,20 +98,20 @@ Dot11sStack::ResetStats (const Ptr mp) { mp->ResetStats (); - + std::vector > ifaces = mp->GetInterfaces (); for (std::vector >::const_iterator i = ifaces.begin (); i != ifaces.end (); ++i) - { - Ptr device = (*i)->GetObject (); - NS_ASSERT (device != 0); - MeshInterfaceHelper::ResetStats (device); - } - Ptr hwmp = mp->GetObject (); - NS_ASSERT(hwmp != 0); + { + Ptr device = (*i)->GetObject (); + NS_ASSERT (device != 0); + MeshInterfaceHelper::ResetStats (device); + } + Ptr hwmp = mp->GetObject (); + NS_ASSERT (hwmp != 0); hwmp->ResetStats (); - Ptr pmp = mp->GetObject (); - NS_ASSERT(pmp != 0); + Ptr pmp = mp->GetObject (); + NS_ASSERT (pmp != 0); pmp->ResetStats (); } } //namespace ns3