From 4bcf4abddae3246f59563557b0c327bb759f5a00 Mon Sep 17 00:00:00 2001 From: Tommaso Pecorella Date: Thu, 23 Jun 2016 23:55:32 +0200 Subject: [PATCH] various: (fixes #2446) Fix comma instead of pipe in Attributes --- RELEASE_NOTES | 1 + examples/tcp/tcp-nsc-lfn.cc | 4 ++-- src/core/test/attribute-test-suite.cc | 6 +----- src/netanim/examples/colors-link-description.cc | 4 ++-- src/netanim/examples/resources-counters.cc | 4 ++-- src/traffic-control/examples/pfifo-vs-red.cc | 4 ++-- src/traffic-control/examples/red-vs-ared.cc | 4 ++-- 7 files changed, 12 insertions(+), 15 deletions(-) diff --git a/RELEASE_NOTES b/RELEASE_NOTES index 39baa08bb..94c1989da 100644 --- a/RELEASE_NOTES +++ b/RELEASE_NOTES @@ -76,6 +76,7 @@ Bugs fixed - Bug 2438 - Routing protocols should stop processing packets coming from a non-forwarding interface - Bug 2439 - SixLowPan Compression kind need to be casted to int in the Print function - Bug 2440 - SocketIpTosTag might be added twice if a packet is sent multiple times +- Bug 2446 - Comma instead of pipe in Attributes Known issues ------------ diff --git a/examples/tcp/tcp-nsc-lfn.cc b/examples/tcp/tcp-nsc-lfn.cc index f3cfc0d7a..2a3c90bbc 100644 --- a/examples/tcp/tcp-nsc-lfn.cc +++ b/examples/tcp/tcp-nsc-lfn.cc @@ -100,9 +100,9 @@ int main (int argc, char *argv[]) DoubleValue rate (errRate); Ptr em1 = - CreateObjectWithAttributes ("RanVar", StringValue ("ns3::UniformRandomVariable[Min=0.0,Max=1.0]"), "ErrorRate", rate); + CreateObjectWithAttributes ("RanVar", StringValue ("ns3::UniformRandomVariable[Min=0.0|Max=1.0]"), "ErrorRate", rate); Ptr em2 = - CreateObjectWithAttributes ("RanVar", StringValue ("ns3::UniformRandomVariable[Min=0.0,Max=1.0]"), "ErrorRate", rate); + CreateObjectWithAttributes ("RanVar", StringValue ("ns3::UniformRandomVariable[Min=0.0|Max=1.0]"), "ErrorRate", rate); // This enables the specified errRate on both link endpoints. p2pInterfaces.Get (0)->SetAttribute ("ReceiveErrorModel", PointerValue (em1)); diff --git a/src/core/test/attribute-test-suite.cc b/src/core/test/attribute-test-suite.cc index 45bf3b8db..17e9c048b 100644 --- a/src/core/test/attribute-test-suite.cc +++ b/src/core/test/attribute-test-suite.cc @@ -823,17 +823,13 @@ RandomVariableStreamAttributeTestCase::DoRun (void) // // Try to set a UniformRandomVariable // - ok = p->SetAttributeFailSafe ("TestRandom", StringValue ("ns3::UniformRandomVariable[Min=0.,Max=1.]")); + ok = p->SetAttributeFailSafe ("TestRandom", StringValue ("ns3::UniformRandomVariable[Min=0.|Max=1.]")); NS_TEST_ASSERT_MSG_EQ (ok, true, "Could not SetAttributeFailSafe() a UniformRandomVariable"); // // Try to set a ConstantRandomVariable // - // ok = p->SetAttributeFailSafe ("TestRandom", StringValue ("ns3::ConstantRandomVariable[Constant=10.0]")); - //ok = p->SetAttributeFailSafe ("TestRandom", StringValue ("ns3::UniformRandomVariable[Min=0.,Max=1.]")); - ok = p->SetAttributeFailSafe ("TestRandom", StringValue ("ns3::ConstantRandomVariable[Constant=1.0]")); - NS_TEST_ASSERT_MSG_EQ (ok, true, "Could not SetAttributeFailSafe() a ConstantRandomVariable"); } diff --git a/src/netanim/examples/colors-link-description.cc b/src/netanim/examples/colors-link-description.cc index 12b5000d7..fd5757e24 100644 --- a/src/netanim/examples/colors-link-description.cc +++ b/src/netanim/examples/colors-link-description.cc @@ -127,9 +127,9 @@ int main (int argc, char *argv[]) // Install on/off app on all right side nodes OnOffHelper clientHelper ("ns3::UdpSocketFactory", Address ()); clientHelper.SetAttribute - ("OnTime", StringValue ("ns3::UniformRandomVariable[Min=0.,Max=1.]")); + ("OnTime", StringValue ("ns3::UniformRandomVariable[Min=0.|Max=1.]")); clientHelper.SetAttribute - ("OffTime", StringValue ("ns3::UniformRandomVariable[Min=0.,Max=1.]")); + ("OffTime", StringValue ("ns3::UniformRandomVariable[Min=0.|Max=1.]")); ApplicationContainer clientApps; for (uint32_t i = 0; i < d.RightCount (); ++i) diff --git a/src/netanim/examples/resources-counters.cc b/src/netanim/examples/resources-counters.cc index 04d5dc078..60885307d 100644 --- a/src/netanim/examples/resources-counters.cc +++ b/src/netanim/examples/resources-counters.cc @@ -153,9 +153,9 @@ int main (int argc, char *argv[]) // Install on/off app on all right side nodes OnOffHelper clientHelper ("ns3::UdpSocketFactory", Address ()); clientHelper.SetAttribute - ("OnTime", StringValue ("ns3::UniformRandomVariable[Min=0.,Max=1.]")); + ("OnTime", StringValue ("ns3::UniformRandomVariable[Min=0.|Max=1.]")); clientHelper.SetAttribute - ("OffTime", StringValue ("ns3::UniformRandomVariable[Min=0.,Max=1.]")); + ("OffTime", StringValue ("ns3::UniformRandomVariable[Min=0.|Max=1.]")); ApplicationContainer clientApps; for (uint32_t i = 0; i < d.RightCount (); ++i) diff --git a/src/traffic-control/examples/pfifo-vs-red.cc b/src/traffic-control/examples/pfifo-vs-red.cc index b8caf0ac0..f9c29674b 100644 --- a/src/traffic-control/examples/pfifo-vs-red.cc +++ b/src/traffic-control/examples/pfifo-vs-red.cc @@ -138,8 +138,8 @@ int main (int argc, char *argv[]) // Install on/off app on all right side nodes OnOffHelper clientHelper ("ns3::TcpSocketFactory", Address ()); - clientHelper.SetAttribute ("OnTime", StringValue ("ns3::UniformRandomVariable[Min=0.,Max=1.]")); - clientHelper.SetAttribute ("OffTime", StringValue ("ns3::UniformRandomVariable[Min=0.,Max=1.]")); + clientHelper.SetAttribute ("OnTime", StringValue ("ns3::UniformRandomVariable[Min=0.|Max=1.]")); + clientHelper.SetAttribute ("OffTime", StringValue ("ns3::UniformRandomVariable[Min=0.|Max=1.]")); Address sinkLocalAddress (InetSocketAddress (Ipv4Address::GetAny (), port)); PacketSinkHelper packetSinkHelper ("ns3::TcpSocketFactory", sinkLocalAddress); ApplicationContainer sinkApps; diff --git a/src/traffic-control/examples/red-vs-ared.cc b/src/traffic-control/examples/red-vs-ared.cc index 35b38c6df..4670db07e 100644 --- a/src/traffic-control/examples/red-vs-ared.cc +++ b/src/traffic-control/examples/red-vs-ared.cc @@ -138,8 +138,8 @@ int main (int argc, char *argv[]) // Install on/off app on all right side nodes OnOffHelper clientHelper ("ns3::TcpSocketFactory", Address ()); - clientHelper.SetAttribute ("OnTime", StringValue ("ns3::UniformRandomVariable[Min=0.,Max=1.]")); - clientHelper.SetAttribute ("OffTime", StringValue ("ns3::UniformRandomVariable[Min=0.,Max=1.]")); + clientHelper.SetAttribute ("OnTime", StringValue ("ns3::UniformRandomVariable[Min=0.|Max=1.]")); + clientHelper.SetAttribute ("OffTime", StringValue ("ns3::UniformRandomVariable[Min=0.|Max=1.]")); Address sinkLocalAddress (InetSocketAddress (Ipv4Address::GetAny (), port)); PacketSinkHelper packetSinkHelper ("ns3::TcpSocketFactory", sinkLocalAddress); ApplicationContainer sinkApps;