Update OLSR test traces due to random variable perturbations
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -89,6 +89,7 @@ Bug780Test::CreateNodes (void)
|
||||
int nWifis = 3;
|
||||
double SimTime = 200.0;
|
||||
std::string phyMode ("DsssRate1Mbps");
|
||||
int64_t streamsUsed = 0;
|
||||
|
||||
//sending one packets per sec
|
||||
// Fix non-unicast data rate to be the same as that of unicast
|
||||
@@ -103,7 +104,8 @@ Bug780Test::CreateNodes (void)
|
||||
YansWifiChannelHelper wifiChannel;
|
||||
wifiChannel.SetPropagationDelay ("ns3::ConstantSpeedPropagationDelayModel");
|
||||
wifiChannel.AddPropagationLoss ("ns3::FriisPropagationLossModel");
|
||||
wifiPhy.SetChannel (wifiChannel.Create ());
|
||||
Ptr<YansWifiChannel> chan = wifiChannel.Create ();
|
||||
wifiPhy.SetChannel (chan);
|
||||
|
||||
// Add a non-QoS upper mac, and disable rate control
|
||||
NqosWifiMacHelper wifiMac = NqosWifiMacHelper::Default ();
|
||||
@@ -120,13 +122,21 @@ Bug780Test::CreateNodes (void)
|
||||
wifiMac.SetType ("ns3::AdhocWifiMac");
|
||||
NetDeviceContainer adhocDevices = wifi.Install (wifiPhy, wifiMac, adhocNodes);
|
||||
|
||||
// Assign fixed stream numbers to wifi and channel random variables
|
||||
streamsUsed += wifi.AssignStreams (adhocDevices, streamsUsed);
|
||||
// Assign 6 streams per Wifi device
|
||||
NS_TEST_ASSERT_MSG_EQ (streamsUsed, (adhocDevices.GetN () * 6), "Stream assignment mismatch");
|
||||
streamsUsed += wifiChannel.AssignStreams (chan, streamsUsed);
|
||||
// Assign 0 streams per channel for this configuration
|
||||
NS_TEST_ASSERT_MSG_EQ (streamsUsed, (adhocDevices.GetN () * 6), "Stream assignment mismatch");
|
||||
|
||||
OlsrHelper olsr;
|
||||
|
||||
InternetStackHelper internet;
|
||||
internet.SetRoutingHelper (olsr);
|
||||
internet.Install (adhocNodes);
|
||||
int64_t streamsUsed = olsr.AssignStreams (adhocNodes, 0);
|
||||
NS_TEST_EXPECT_MSG_EQ (streamsUsed, nWifis, "Should have assigned 3 streams");
|
||||
streamsUsed += olsr.AssignStreams (adhocNodes, 0);
|
||||
NS_TEST_ASSERT_MSG_EQ (streamsUsed, ((adhocDevices.GetN () * 6) + nWifis), "Should have assigned 3 streams");
|
||||
|
||||
Ipv4AddressHelper addressAdhoc;
|
||||
addressAdhoc.SetBase ("10.1.1.0", "255.255.255.0");
|
||||
|
||||
@@ -75,8 +75,9 @@ HelloRegressionTest::CreateNodes ()
|
||||
InternetStackHelper internet;
|
||||
internet.SetRoutingHelper (olsr);
|
||||
internet.Install (c);
|
||||
// Assign OLSR RVs to specific streams
|
||||
int64_t streamsUsed = olsr.AssignStreams (c, 0);
|
||||
NS_TEST_EXPECT_MSG_EQ (streamsUsed, 2, "Should have assigned 2 streams");
|
||||
NS_TEST_ASSERT_MSG_EQ (streamsUsed, 2, "Should have assigned 2 streams");
|
||||
// create p2p channel & devices
|
||||
PointToPointHelper p2p;
|
||||
p2p.SetDeviceAttribute ("DataRate", StringValue ("5Mbps"));
|
||||
|
||||
Reference in New Issue
Block a user