--- a/src/devices/mesh/dot11s/dot11s-installator.cc Wed Jun 10 17:33:12 2009 +0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,86 +0,0 @@
-/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
-/*
- * Copyright (c) 2008,2009 IITP RAS
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation;
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- * Authors: Kirill Andreev <andreev@iitp.ru>
- */
-#include "ns3/mesh-interface-helper.h"
-#include "dot11s-installator.h"
-#include "peer-management-protocol.h"
-#include "hwmp-protocol.h"
-
-namespace ns3 {
-namespace dot11s {
-bool
-Dot11sStackInstallator::InstallDot11sStack (Ptr<MeshPointDevice> mp, bool root)
-{
- //Install Peer management protocol:
- Ptr<PeerManagementProtocol> pmp = CreateObject<PeerManagementProtocol> ();
- pmp->SetMeshId("mesh");
- bool install_ok = pmp->Install (mp);
- if(!install_ok)
- return false;
- //Install HWMP:
- Ptr<HwmpProtocol> hwmp = CreateObject<HwmpProtocol> ();
- install_ok = hwmp->Install (mp);
- if(!install_ok)
- return false;
- if(root)
- hwmp->SetRoot ();
- //Install interaction between HWMP and Peer management protocol:
- pmp->SetPeerLinkStatusCallback(MakeCallback(&HwmpProtocol::PeerLinkStatus, hwmp));
- hwmp->SetNeighboursCallback(MakeCallback(&PeerManagementProtocol::GetActiveLinks, pmp));
- return true;
-}
-void
-Dot11sStackInstallator::Report (const Ptr<MeshPointDevice> mp, std::ostream& os)
-{
- std::vector<Ptr<NetDevice> > ifaces = mp->GetInterfaces ();
- for (std::vector<Ptr<NetDevice> >::const_iterator i = ifaces.begin(); i != ifaces.end(); ++i)
- {
- Ptr<WifiNetDevice> device = (*i)->GetObject<WifiNetDevice> ();
- NS_ASSERT (device != 0);
- MeshInterfaceHelper::Report(device, os);
- }
- Ptr <HwmpProtocol> hwmp = mp->GetObject<HwmpProtocol> ();
- NS_ASSERT(hwmp != 0);
- hwmp->Report (os);
-
- Ptr <PeerManagementProtocol> pmp = mp->GetObject<PeerManagementProtocol> ();
- NS_ASSERT(pmp != 0);
- pmp->Report (os);
-}
-void
-Dot11sStackInstallator::ResetStats (const Ptr<MeshPointDevice> mp)
-{
- std::vector<Ptr<NetDevice> > ifaces = mp->GetInterfaces ();
- for (std::vector<Ptr<NetDevice> >::const_iterator i = ifaces.begin(); i != ifaces.end(); ++i)
- {
- Ptr<WifiNetDevice> device = (*i)->GetObject<WifiNetDevice> ();
- NS_ASSERT (device != 0);
- MeshInterfaceHelper::ResetStats (device);
- }
- Ptr <HwmpProtocol> hwmp = mp->GetObject<HwmpProtocol> ();
- NS_ASSERT(hwmp != 0);
- hwmp->ResetStats ();
-
- Ptr <PeerManagementProtocol> pmp = mp->GetObject<PeerManagementProtocol> ();
- NS_ASSERT(pmp != 0);
- pmp->ResetStats ();
-}
-
-}
-}
--- a/src/devices/mesh/dot11s/dot11s-installator.h Wed Jun 10 17:33:12 2009 +0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
-/*
- * Copyright (c) 2008,2009 IITP RAS
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation;
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- * Authors: Kirill Andreev <andreev@iitp.ru>
- */
-
-
-#ifndef MESH_INSTALLATOR_H
-#define MESH_INSTALLATOR_H
-#include "ns3/mesh-point-device.h"
-namespace ns3 {
-namespace dot11s {
-class Dot11sStackInstallator
-{
- public:
- ///\brief Installs 802.11s stack. needed by helper only
- static bool InstallDot11sStack (Ptr<MeshPointDevice> mp, bool root);
- static void Report (const Ptr<MeshPointDevice> mp, std::ostream&);
- static void ResetStats (const Ptr<MeshPointDevice> mp);
-};
-
-}
-}
-#endif
-
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/devices/mesh/dot11s/dot11s-installer.cc Wed Jun 10 18:57:27 2009 +0400
@@ -0,0 +1,86 @@
+/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) 2008,2009 IITP RAS
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * Authors: Kirill Andreev <andreev@iitp.ru>
+ */
+#include "ns3/mesh-interface-helper.h"
+#include "dot11s-installer.h"
+#include "peer-management-protocol.h"
+#include "hwmp-protocol.h"
+
+namespace ns3 {
+namespace dot11s {
+bool
+Dot11sStackInstaller::InstallDot11sStack (Ptr<MeshPointDevice> mp, bool root)
+{
+ //Install Peer management protocol:
+ Ptr<PeerManagementProtocol> pmp = CreateObject<PeerManagementProtocol> ();
+ pmp->SetMeshId("mesh");
+ bool install_ok = pmp->Install (mp);
+ if(!install_ok)
+ return false;
+ //Install HWMP:
+ Ptr<HwmpProtocol> hwmp = CreateObject<HwmpProtocol> ();
+ install_ok = hwmp->Install (mp);
+ if(!install_ok)
+ return false;
+ if(root)
+ hwmp->SetRoot ();
+ //Install interaction between HWMP and Peer management protocol:
+ pmp->SetPeerLinkStatusCallback(MakeCallback(&HwmpProtocol::PeerLinkStatus, hwmp));
+ hwmp->SetNeighboursCallback(MakeCallback(&PeerManagementProtocol::GetActiveLinks, pmp));
+ return true;
+}
+void
+Dot11sStackInstaller::Report (const Ptr<MeshPointDevice> mp, std::ostream& os)
+{
+ std::vector<Ptr<NetDevice> > ifaces = mp->GetInterfaces ();
+ for (std::vector<Ptr<NetDevice> >::const_iterator i = ifaces.begin(); i != ifaces.end(); ++i)
+ {
+ Ptr<WifiNetDevice> device = (*i)->GetObject<WifiNetDevice> ();
+ NS_ASSERT (device != 0);
+ MeshInterfaceHelper::Report(device, os);
+ }
+ Ptr <HwmpProtocol> hwmp = mp->GetObject<HwmpProtocol> ();
+ NS_ASSERT(hwmp != 0);
+ hwmp->Report (os);
+
+ Ptr <PeerManagementProtocol> pmp = mp->GetObject<PeerManagementProtocol> ();
+ NS_ASSERT(pmp != 0);
+ pmp->Report (os);
+}
+void
+Dot11sStackInstaller::ResetStats (const Ptr<MeshPointDevice> mp)
+{
+ std::vector<Ptr<NetDevice> > ifaces = mp->GetInterfaces ();
+ for (std::vector<Ptr<NetDevice> >::const_iterator i = ifaces.begin(); i != ifaces.end(); ++i)
+ {
+ Ptr<WifiNetDevice> device = (*i)->GetObject<WifiNetDevice> ();
+ NS_ASSERT (device != 0);
+ MeshInterfaceHelper::ResetStats (device);
+ }
+ Ptr <HwmpProtocol> hwmp = mp->GetObject<HwmpProtocol> ();
+ NS_ASSERT(hwmp != 0);
+ hwmp->ResetStats ();
+
+ Ptr <PeerManagementProtocol> pmp = mp->GetObject<PeerManagementProtocol> ();
+ NS_ASSERT(pmp != 0);
+ pmp->ResetStats ();
+}
+
+}
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/devices/mesh/dot11s/dot11s-installer.h Wed Jun 10 18:57:27 2009 +0400
@@ -0,0 +1,39 @@
+/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) 2008,2009 IITP RAS
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * Authors: Kirill Andreev <andreev@iitp.ru>
+ */
+
+
+#ifndef MESH_INSTALLATOR_H
+#define MESH_INSTALLATOR_H
+#include "ns3/mesh-point-device.h"
+namespace ns3 {
+namespace dot11s {
+class Dot11sStackInstaller
+{
+ public:
+ ///\brief Installs 802.11s stack. needed by helper only
+ static bool InstallDot11sStack (Ptr<MeshPointDevice> mp, bool root);
+ static void Report (const Ptr<MeshPointDevice> mp, std::ostream&);
+ static void ResetStats (const Ptr<MeshPointDevice> mp);
+};
+
+}
+}
+#endif
+
--- a/src/devices/mesh/dot11s/wscript Wed Jun 10 17:33:12 2009 +0400
+++ b/src/devices/mesh/dot11s/wscript Wed Jun 10 18:57:27 2009 +0400
@@ -23,10 +23,10 @@
'hwmp-mac-plugin.cc',
'hwmp-protocol.cc',
'airtime-metric.cc',
- 'dot11s-installator.cc',
+ 'dot11s-installer.cc',
]
headers = bld.new_task_gen('ns3header')
headers.module = 'dot11s'
headers.source = [
- 'dot11s-installator.h',
+ 'dot11s-installer.h',
]
--- a/src/helper/dot11s-helper.cc Wed Jun 10 17:33:12 2009 +0400
+++ b/src/helper/dot11s-helper.cc Wed Jun 10 18:57:27 2009 +0400
@@ -19,7 +19,7 @@
* Pavel Boyko <boyko@iitp.ru>
*/
#include "dot11s-helper.h"
-#include "ns3/dot11s-installator.h"
+#include "ns3/dot11s-installer.h"
#include "ns3/simulator.h"
#include "ns3/mesh-point-device.h"
#include "ns3/wifi-net-device.h"
@@ -58,7 +58,7 @@
for (unsigned int j = 0; j < roots.size (); j ++)
if(node_counter == roots[j])
root = true;
- if(!Dot11sStackInstallator::InstallDot11sStack (mp, root))
+ if(!Dot11sStackInstaller::InstallDot11sStack (mp, root))
{
NS_ASSERT(false);
}
@@ -80,7 +80,7 @@
NS_ASSERT (mp != 0);
std::vector<Ptr<NetDevice> > ifaces = mp->GetInterfaces ();
os << "<MeshPointDevice ReportTime=\"" << Simulator::Now().GetSeconds() << "s\" MpAddress=\"" << mp->GetAddress () << "\">\n";
- Dot11sStackInstallator::Report (mp, os);
+ Dot11sStackInstaller::Report (mp, os);
os << "</MeshPointDevice>\n";
}
void
@@ -88,7 +88,7 @@
{
Ptr <MeshPointDevice> mp = device->GetObject<MeshPointDevice> ();
NS_ASSERT (mp != 0);
- Dot11sStackInstallator::ResetStats (mp);
+ Dot11sStackInstaller::ResetStats (mp);
}
} //namespace ns3