various: (fixes #2446) Fix comma instead of pipe in Attributes

This commit is contained in:
Tommaso Pecorella
2016-06-23 23:55:32 +02:00
parent 4937734929
commit 4bcf4abdda
7 changed files with 12 additions and 15 deletions

View File

@@ -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
------------

View File

@@ -100,9 +100,9 @@ int main (int argc, char *argv[])
DoubleValue rate (errRate);
Ptr<RateErrorModel> em1 =
CreateObjectWithAttributes<RateErrorModel> ("RanVar", StringValue ("ns3::UniformRandomVariable[Min=0.0,Max=1.0]"), "ErrorRate", rate);
CreateObjectWithAttributes<RateErrorModel> ("RanVar", StringValue ("ns3::UniformRandomVariable[Min=0.0|Max=1.0]"), "ErrorRate", rate);
Ptr<RateErrorModel> em2 =
CreateObjectWithAttributes<RateErrorModel> ("RanVar", StringValue ("ns3::UniformRandomVariable[Min=0.0,Max=1.0]"), "ErrorRate", rate);
CreateObjectWithAttributes<RateErrorModel> ("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));

View File

@@ -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 <snicker> 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");
}

View File

@@ -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)

View File

@@ -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)

View File

@@ -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;

View File

@@ -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;