wimax support.. still ongoing...
authorAlina Quereilhac <alina.quereilhac@inria.fr>
Thu, 22 Sep 2011 16:45:41 +0000 (18:45 +0200)
committerAlina Quereilhac <alina.quereilhac@inria.fr>
Thu, 22 Sep 2011 16:45:41 +0000 (18:45 +0200)
examples/wimax_ns3.py
src/nepi/testbeds/ns3/connection_metadata.py
src/nepi/testbeds/ns3/factories_metadata.py
src/nepi/testbeds/ns3/metadata.py

index a1d88a6..c6680cd 100644 (file)
@@ -131,8 +131,8 @@ class Roads09Example(object):
         controller.shutdown()
 
     def clean(self):
-        #shutil.rmtree(self.root_dir)
         print self.root_dir
+        #shutil.rmtree(self.root_dir)
         pass
 
 if __name__ == '__main__':
index 5c9c22c..f68b31c 100644 (file)
@@ -96,10 +96,15 @@ def connect_node_other(testbed_instance, node_guid, other_guid):
     other = testbed_instance._elements[other_guid]
     node.AggregateObject(other)
 
-def connect_station_sflow(testbed_instance, station_guid, sflow_guid):
-    station = testbed_instance._elements[station_guid]
+def connect_ss_sflow(testbed_instance, station_guid, sflow_guid):
+    ss = testbed_instance._elements[station_guid]
     sflow = testbed_instance._elements[sflow_guid]
-    station.AddServiceFlow(sflow)
+    ss.AddServiceFlow(sflow)
+
+#def connect_bs_sflow(testbed_instance, station_guid, sflow_guid):
+#    bs = testbed_instance._elements[station_guid]
+#    sflow = testbed_instance._elements[sflow_guid]
+#    bs.GetServiceFlowManager().AddServiceFlow (sflow)
 
 def connect_bstation_linksched(testbed_instance, bstation_guid, linksched_guid):
     bstation = testbed_instance._elements[bstation_guid]
@@ -709,15 +714,15 @@ connections = [
     dict({
         "from": ( "ns3", "ns3::SubscriberStationNetDevice", "sflows" ),
         "to":   ( "ns3", "ns3::ServiceFlow", "dev" ),
-        "init_code": connect_station_sflow,
-        "can_cross": False
-    }),
-    dict({
-        "from": ( "ns3", "ns3::BaseStationNetDevice", "sflows" ),
-        "to":   ( "ns3", "ns3::ServiceFlow", "dev" ),
-        "init_code": connect_station_sflow,
+        "init_code": connect_ss_sflow,
         "can_cross": False
     }),
+#    dict({
+#        "from": ( "ns3", "ns3::BaseStationNetDevice", "sflows" ),
+#        "to":   ( "ns3", "ns3::ServiceFlow", "dev" ),
+#        "init_code": connect_bs_sflow,
+#        "can_cross": False
+#    }),
     dict({
         "from": ( "ns3", "ns3::BaseStationNetDevice", "uplnk" ),
         "to":   ( "ns3", "ns3::UplinkSchedulerSimple", "dev" ),
index 38af010..006d252 100644 (file)
@@ -407,7 +407,6 @@ def configure_element(testbed_instance, guid):
 
 def configure_device(testbed_instance, guid):
     configure_traces(testbed_instance, guid)
-
     element = testbed_instance._elements[guid]
 
     parameters = testbed_instance._get_parameters(guid)
@@ -497,7 +496,7 @@ def configure_node(testbed_instance, guid):
                         break
             if ifindex < 0:
                 # Check previous ptp routes
-                for chaindest, chainprefix, chainhop in routes:
+                for chaindest, chainprefix, chainhop, metric in routes:
                     if chaindest == nexthop and chainprefix == 32:
                         chainhop_address = ns3.Ipv4Address(chainhop)
                         for ifidx in xrange(nifaces):
@@ -530,7 +529,7 @@ def configure_station(testbed_instance, guid):
 
 ###  Factories  ###
 
-factories_order = ["ns3::BasicEnergySource",
+factories_create_order = ["ns3::BasicEnergySource",
     "ns3::WifiRadioEnergyModel",
     "ns3::BSSchedulerRtps",
     "ns3::BSSchedulerSimple",
@@ -689,6 +688,166 @@ factories_order = ["ns3::BasicEnergySource",
     "ns3::SubscriberStationNetDevice",
  ]
 
+factories_configure_order = ["ns3::BasicEnergySource",
+    "ns3::WifiRadioEnergyModel",
+    "ns3::BSSchedulerRtps",
+    "ns3::BSSchedulerSimple",
+    "ns3::UdpTraceClient",
+    "ns3::UdpServer",
+    "ns3::UdpClient",
+    "ns3::FlowMonitor",
+    "ns3::Radvd",
+    "ns3::Ping6",
+    "ns3::flame::FlameProtocol",
+    "ns3::flame::FlameRtable",
+    "ns3::dot11s::AirtimeLinkMetricCalculator",
+    "ns3::dot11s::HwmpProtocol",
+    "ns3::dot11s::HwmpRtable",
+    "ns3::dot11s::PeerManagementProtocol",
+    "ns3::dot11s::PeerLink",
+    "ns3::MeshWifiInterfaceMac",
+    "ns3::MeshPointDevice",
+    "ns3::UanMacRcGw",
+    "ns3::UanMacRc",
+    "ns3::UanPhyCalcSinrDual",
+    "ns3::UanPhyPerGenDefault",
+    "ns3::UanPhyDual",
+    "ns3::UanPropModelThorp",
+    "ns3::UanMacCw",
+    "ns3::UanNoiseModelDefault",
+    "ns3::UanMacAloha",
+    "ns3::UanPropModelIdeal",
+    "ns3::UanTransducerHd",
+    "ns3::UanPhyCalcSinrDefault",
+    "ns3::UanPhyGen",
+    "ns3::UanPhyCalcSinrFhFsk",
+    "ns3::UanPhyPerUmodem",
+    "ns3::UanChannel",
+    "ns3::V4Ping",
+    "ns3::AthstatsWifiTraceSink",
+    "ns3::FlameStack",
+    "ns3::Dot11sStack",
+    "ns3::NonCommunicatingNetDevice",
+    "ns3::HalfDuplexIdealPhy",
+    "ns3::AlohaNoackNetDevice",
+    "ns3::SpectrumAnalyzer",
+    "ns3::WaveformGenerator",
+    "ns3::MultiModelSpectrumChannel",
+    "ns3::SingleModelSpectrumChannel",
+    "ns3::MsduStandardAggregator",
+    "ns3::EdcaTxopN",
+    "ns3::StaWifiMac",
+    "ns3::ApWifiMac",
+    "ns3::QadhocWifiMac",
+    "ns3::MinstrelWifiManager",
+    "ns3::CaraWifiManager",
+    "ns3::AarfcdWifiManager",
+    "ns3::OnoeWifiManager",
+    "ns3::AmrrWifiManager",
+    "ns3::ConstantRateWifiManager",
+    "ns3::IdealWifiManager",
+    "ns3::AarfWifiManager",
+    "ns3::ArfWifiManager",
+    "ns3::WifiNetDevice",
+    "ns3::AdhocWifiMac",
+    "ns3::DcaTxop",
+    "ns3::WifiMacQueue",
+    "ns3::YansWifiChannel",
+    "ns3::YansWifiPhy",
+    "ns3::NistErrorRateModel",
+    "ns3::YansErrorRateModel",
+    "ns3::WaypointMobilityModel",
+    "ns3::ConstantAccelerationMobilityModel",
+    "ns3::RandomDirection2dMobilityModel",
+    "ns3::RandomWalk2dMobilityModel",
+    "ns3::SteadyStateRandomWaypointMobilityModel",
+    "ns3::RandomWaypointMobilityModel",
+    "ns3::GaussMarkovMobilityModel",
+    "ns3::ConstantVelocityMobilityModel",
+    "ns3::ConstantPositionMobilityModel",
+    "ns3::ListPositionAllocator",
+    "ns3::GridPositionAllocator",
+    "ns3::RandomRectanglePositionAllocator",
+    "ns3::RandomBoxPositionAllocator",
+    "ns3::RandomDiscPositionAllocator",
+    "ns3::UniformDiscPositionAllocator",
+    "ns3::HierarchicalMobilityModel",
+    "ns3::aodv::RoutingProtocol",
+    "ns3::UdpEchoServer",
+    "ns3::UdpEchoClient",
+    "ns3::PacketSink",
+    "ns3::OnOffApplication",
+    "ns3::VirtualNetDevice",
+    "ns3::FdNetDevice",
+    "ns3::Nepi::TunChannel",
+    "ns3::TapBridge",
+    "ns3::BridgeChannel",
+    "ns3::BridgeNetDevice",
+    "ns3::EmuNetDevice",
+    "ns3::CsmaChannel",
+    "ns3::CsmaNetDevice",
+    "ns3::PointToPointRemoteChannel",
+    "ns3::PointToPointChannel",
+    "ns3::PointToPointNetDevice",
+    "ns3::BaseStationNetDevice",
+    "ns3::SubscriberStationNetDevice",
+    "ns3::NscTcpL4Protocol",
+    "ns3::Icmpv6L4Protocol",
+    "ns3::Ipv6OptionPad1",
+    "ns3::Ipv6OptionPadn",
+    "ns3::Ipv6OptionJumbogram",
+    "ns3::Ipv6OptionRouterAlert",
+    "ns3::Ipv6ExtensionHopByHop",
+    "ns3::Ipv6ExtensionDestination",
+    "ns3::Ipv6ExtensionFragment",
+    "ns3::Ipv6ExtensionRouting",
+    "ns3::Ipv6ExtensionLooseRouting",
+    "ns3::Ipv6ExtensionESP",
+    "ns3::Ipv6ExtensionAH",
+    "ns3::Ipv6L3Protocol",
+    "ns3::LoopbackNetDevice",
+    "ns3::Icmpv4L4Protocol",
+    "ns3::RttMeanDeviation",
+    "ns3::ArpL3Protocol",
+    "ns3::TcpL4Protocol",
+    "ns3::UdpL4Protocol",
+    "ns3::Ipv4L3Protocol",
+    "ns3::SimpleNetDevice",
+    "ns3::SimpleChannel",
+    "ns3::PacketSocket",
+    "ns3::DropTailQueue",
+    "ns3::Node",
+    "ns3::FriisSpectrumPropagationLossModel",
+    "ns3::Cost231PropagationLossModel",
+    "ns3::JakesPropagationLossModel",
+    "ns3::RandomPropagationLossModel",
+    "ns3::FriisPropagationLossModel",
+    "ns3::TwoRayGroundPropagationLossModel",
+    "ns3::LogDistancePropagationLossModel",
+    "ns3::ThreeLogDistancePropagationLossModel",
+    "ns3::NakagamiPropagationLossModel",
+    "ns3::FixedRssLossModel",
+    "ns3::MatrixPropagationLossModel",
+    "ns3::RangePropagationLossModel",
+    "ns3::RandomPropagationDelayModel",
+    "ns3::ConstantSpeedPropagationDelayModel",
+    "ns3::RateErrorModel",
+    "ns3::ListErrorModel",
+    "ns3::ReceiveListErrorModel",
+    "ns3::PacketBurst",
+    "ns3::EnergySourceContainer",
+    "ns3::BSSchedulerRtps",
+    "ns3::BSSchedulerSimple",
+    "ns3::SimpleOfdmWimaxChannel",
+    "ns3::SimpleOfdmWimaxPhy",
+    "ns3::UplinkSchedulerMBQoS",
+    "ns3::UplinkSchedulerRtps",
+    "ns3::UplinkSchedulerSimple",
+    "ns3::IpcsClassifierRecord",
+    "ns3::ServiceFlow",
+ ]
+
+
 factories_info = dict({
     "ns3::Ping6": dict({
         "category": FC.CATEGORY_APPLICATIONS,
index b1a4d7a..94fb9fb 100644 (file)
@@ -33,13 +33,13 @@ class MetadataInfo(metadata.MetadataInfo):
 
     @property
     def create_order(self):
-        from factories_metadata import factories_order
-        return factories_order
+        from factories_metadata import factories_create_order
+        return factories_create_order
 
     @property
     def configure_order(self):
-        from factories_metadata import factories_order
-        return factories_order
+        from factories_metadata import factories_configure_order
+        return factories_configure_order
 
     @property
     def factories_info(self):