30 #include "ns3/simulator.h"
31 #include "ns3/fq-pie-queue-disc.h"
32 #include "ns3/pie-queue-disc.h"
33 #include "ns3/ipv4-header.h"
34 #include "ns3/ipv4-packet-filter.h"
35 #include "ns3/ipv4-queue-disc-item.h"
36 #include "ns3/ipv4-address.h"
37 #include "ns3/ipv6-header.h"
38 #include "ns3/ipv6-packet-filter.h"
39 #include "ns3/ipv6-queue-disc-item.h"
40 #include "ns3/tcp-header.h"
41 #include "ns3/udp-header.h"
42 #include "ns3/string.h"
43 #include "ns3/pointer.h"
61 static TypeId GetTypeId (
void);
74 static TypeId tid =
TypeId (
"ns3::Ipv4FqPieTestPacketFilter")
76 .SetGroupName (
"Internet")
110 virtual void DoRun (
void);
114 :
TestCase (
"Test packets that are not classified by any filter")
126 queueDisc->AddPacketFilter (filter);
129 queueDisc->SetQuantum (1500);
130 queueDisc->Initialize ();
133 p = Create<Packet> ();
137 item = Create<Ipv6QueueDiscItem> (p, dest, 0, ipv6Header);
138 queueDisc->Enqueue (item);
139 NS_TEST_ASSERT_MSG_EQ (queueDisc->GetNQueueDiscClasses (), 0,
"no flow queue should have been created");
141 p = Create<Packet> (
reinterpret_cast<const uint8_t*
> (
"hello, world"), 12);
142 item = Create<Ipv6QueueDiscItem> (p, dest, 0, ipv6Header);
143 queueDisc->Enqueue (item);
144 NS_TEST_ASSERT_MSG_EQ (queueDisc->GetNQueueDiscClasses (), 0,
"no flow queue should have been created");
146 Simulator::Destroy ();
159 virtual void DoRun (
void);
164 :
TestCase (
"Test IP flows separation and packet limit")
176 queue->Enqueue (item);
184 queueDisc->SetQuantum (1500);
185 queueDisc->Initialize ();
197 NS_TEST_ASSERT_MSG_EQ (queueDisc->QueueDisc::GetNPackets (), 3,
"unexpected number of packets in the queue disc");
198 NS_TEST_ASSERT_MSG_EQ (queueDisc->GetQueueDiscClass (0)->GetQueueDisc ()->GetNPackets (), 3,
"unexpected number of packets in the flow queue");
204 NS_TEST_ASSERT_MSG_EQ (queueDisc->QueueDisc::GetNPackets (), 4,
"unexpected number of packets in the queue disc");
205 NS_TEST_ASSERT_MSG_EQ (queueDisc->GetQueueDiscClass (0)->GetQueueDisc ()->GetNPackets (), 3,
"unexpected number of packets in the flow queue");
206 NS_TEST_ASSERT_MSG_EQ (queueDisc->GetQueueDiscClass (1)->GetQueueDisc ()->GetNPackets (), 1,
"unexpected number of packets in the flow queue");
209 NS_TEST_ASSERT_MSG_EQ (queueDisc->QueueDisc::GetNPackets (), 3,
"unexpected number of packets in the queue disc");
210 NS_TEST_ASSERT_MSG_EQ (queueDisc->GetQueueDiscClass (0)->GetQueueDisc ()->GetNPackets (), 1,
"unexpected number of packets in the flow queue");
211 NS_TEST_ASSERT_MSG_EQ (queueDisc->GetQueueDiscClass (1)->GetQueueDisc ()->GetNPackets (), 2,
"unexpected number of packets in the flow queue");
213 Simulator::Destroy ();
226 virtual void DoRun (
void);
231 :
TestCase (
"Test credits and flows status")
243 queue->Enqueue (item);
251 queueDisc->SetQuantum (90);
252 queueDisc->Initialize ();
262 NS_TEST_ASSERT_MSG_EQ (queueDisc->QueueDisc::GetNPackets (), 1,
"unexpected number of packets in the queue disc");
263 NS_TEST_ASSERT_MSG_EQ (queueDisc->GetQueueDiscClass (0)->GetQueueDisc ()->GetNPackets (), 1,
"unexpected number of packets in the first flow queue");
264 Ptr<FqPieFlow> flow1 = StaticCast<FqPieFlow> (queueDisc->GetQueueDiscClass (0));
265 NS_TEST_ASSERT_MSG_EQ (flow1->GetDeficit (),
static_cast<int32_t
> (queueDisc->GetQuantum ()),
"the deficit of the first flow must equal the quantum");
266 NS_TEST_ASSERT_MSG_EQ (flow1->GetStatus (), FqPieFlow::NEW_FLOW,
"the first flow must be in the list of new queues");
268 queueDisc->Dequeue ();
269 NS_TEST_ASSERT_MSG_EQ (queueDisc->QueueDisc::GetNPackets (), 0,
"unexpected number of packets in the queue disc");
270 NS_TEST_ASSERT_MSG_EQ (queueDisc->GetQueueDiscClass (0)->GetQueueDisc ()->GetNPackets (), 0,
"unexpected number of packets in the first flow queue");
277 NS_TEST_ASSERT_MSG_EQ (queueDisc->QueueDisc::GetNPackets (), 2,
"unexpected number of packets in the queue disc");
278 NS_TEST_ASSERT_MSG_EQ (queueDisc->GetQueueDiscClass (0)->GetQueueDisc ()->GetNPackets (), 2,
"unexpected number of packets in the first flow queue");
279 NS_TEST_ASSERT_MSG_EQ (flow1->GetStatus (), FqPieFlow::NEW_FLOW,
"the first flow must still be in the list of new queues");
285 NS_TEST_ASSERT_MSG_EQ (queueDisc->QueueDisc::GetNPackets (), 4,
"unexpected number of packets in the queue disc");
286 NS_TEST_ASSERT_MSG_EQ (queueDisc->GetQueueDiscClass (0)->GetQueueDisc ()->GetNPackets (), 2,
"unexpected number of packets in the first flow queue");
287 NS_TEST_ASSERT_MSG_EQ (queueDisc->GetQueueDiscClass (1)->GetQueueDisc ()->GetNPackets (), 2,
"unexpected number of packets in the second flow queue");
288 Ptr<FqPieFlow> flow2 = StaticCast<FqPieFlow> (queueDisc->GetQueueDiscClass (1));
289 NS_TEST_ASSERT_MSG_EQ (flow2->GetDeficit (),
static_cast<int32_t
> (queueDisc->GetQuantum ()),
"the deficit of the second flow must equal the quantum");
290 NS_TEST_ASSERT_MSG_EQ (flow2->GetStatus (), FqPieFlow::NEW_FLOW,
"the second flow must be in the list of new queues");
293 queueDisc->Dequeue ();
294 NS_TEST_ASSERT_MSG_EQ (queueDisc->QueueDisc::GetNPackets (), 3,
"unexpected number of packets in the queue disc");
295 NS_TEST_ASSERT_MSG_EQ (queueDisc->GetQueueDiscClass (0)->GetQueueDisc ()->GetNPackets (), 2,
"unexpected number of packets in the first flow queue");
296 NS_TEST_ASSERT_MSG_EQ (queueDisc->GetQueueDiscClass (1)->GetQueueDisc ()->GetNPackets (), 1,
"unexpected number of packets in the second flow queue");
299 NS_TEST_ASSERT_MSG_EQ (flow1->GetStatus (), FqPieFlow::OLD_FLOW,
"the first flow must be in the list of old queues");
302 NS_TEST_ASSERT_MSG_EQ (flow2->GetStatus (), FqPieFlow::NEW_FLOW,
"the second flow must be in the list of new queues");
305 queueDisc->Dequeue ();
306 NS_TEST_ASSERT_MSG_EQ (queueDisc->QueueDisc::GetNPackets (), 2,
"unexpected number of packets in the queue disc");
307 NS_TEST_ASSERT_MSG_EQ (queueDisc->GetQueueDiscClass (0)->GetQueueDisc ()->GetNPackets (), 1,
"unexpected number of packets in the first flow queue");
308 NS_TEST_ASSERT_MSG_EQ (queueDisc->GetQueueDiscClass (1)->GetQueueDisc ()->GetNPackets (), 1,
"unexpected number of packets in the second flow queue");
311 NS_TEST_ASSERT_MSG_EQ (flow1->GetStatus (), FqPieFlow::OLD_FLOW,
"the first flow must be in the list of old queues");
314 NS_TEST_ASSERT_MSG_EQ (flow2->GetStatus (), FqPieFlow::OLD_FLOW,
"the second flow must be in the list of new queues");
317 queueDisc->Dequeue ();
318 NS_TEST_ASSERT_MSG_EQ (queueDisc->QueueDisc::GetNPackets (), 1,
"unexpected number of packets in the queue disc");
319 NS_TEST_ASSERT_MSG_EQ (queueDisc->GetQueueDiscClass (0)->GetQueueDisc ()->GetNPackets (), 1,
"unexpected number of packets in the first flow queue");
320 NS_TEST_ASSERT_MSG_EQ (queueDisc->GetQueueDiscClass (1)->GetQueueDisc ()->GetNPackets (), 0,
"unexpected number of packets in the second flow queue");
323 NS_TEST_ASSERT_MSG_EQ (flow1->GetStatus (), FqPieFlow::OLD_FLOW,
"the first flow must be in the list of old queues");
326 NS_TEST_ASSERT_MSG_EQ (flow2->GetStatus (), FqPieFlow::OLD_FLOW,
"the second flow must be in the list of new queues");
329 queueDisc->Dequeue ();
330 NS_TEST_ASSERT_MSG_EQ (queueDisc->QueueDisc::GetNPackets (), 0,
"unexpected number of packets in the queue disc");
331 NS_TEST_ASSERT_MSG_EQ (queueDisc->GetQueueDiscClass (0)->GetQueueDisc ()->GetNPackets (), 0,
"unexpected number of packets in the first flow queue");
332 NS_TEST_ASSERT_MSG_EQ (queueDisc->GetQueueDiscClass (1)->GetQueueDisc ()->GetNPackets (), 0,
"unexpected number of packets in the second flow queue");
335 NS_TEST_ASSERT_MSG_EQ (flow1->GetStatus (), FqPieFlow::OLD_FLOW,
"the first flow must be in the list of old queues");
338 NS_TEST_ASSERT_MSG_EQ (flow2->GetStatus (), FqPieFlow::OLD_FLOW,
"the second flow must be in the list of new queues");
341 queueDisc->Dequeue ();
353 Simulator::Destroy ();
366 virtual void DoRun (
void);
371 :
TestCase (
"Test TCP flows separation")
384 queue->Enqueue (item);
392 queueDisc->SetQuantum (1500);
393 queueDisc->Initialize ();
409 NS_TEST_ASSERT_MSG_EQ (queueDisc->QueueDisc::GetNPackets (), 3,
"unexpected number of packets in the queue disc");
410 NS_TEST_ASSERT_MSG_EQ (queueDisc->GetQueueDiscClass (0)->GetQueueDisc ()->GetNPackets (), 3,
"unexpected number of packets in the first flow queue");
415 NS_TEST_ASSERT_MSG_EQ (queueDisc->QueueDisc::GetNPackets (), 4,
"unexpected number of packets in the queue disc");
416 NS_TEST_ASSERT_MSG_EQ (queueDisc->GetQueueDiscClass (0)->GetQueueDisc ()->GetNPackets (), 3,
"unexpected number of packets in the first flow queue");
417 NS_TEST_ASSERT_MSG_EQ (queueDisc->GetQueueDiscClass (1)->GetQueueDisc ()->GetNPackets (), 1,
"unexpected number of packets in the second flow queue");
422 NS_TEST_ASSERT_MSG_EQ (queueDisc->QueueDisc::GetNPackets (), 5,
"unexpected number of packets in the queue disc");
423 NS_TEST_ASSERT_MSG_EQ (queueDisc->GetQueueDiscClass (0)->GetQueueDisc ()->GetNPackets (), 3,
"unexpected number of packets in the first flow queue");
424 NS_TEST_ASSERT_MSG_EQ (queueDisc->GetQueueDiscClass (1)->GetQueueDisc ()->GetNPackets (), 1,
"unexpected number of packets in the second flow queue");
425 NS_TEST_ASSERT_MSG_EQ (queueDisc->GetQueueDiscClass (2)->GetQueueDisc ()->GetNPackets (), 1,
"unexpected number of packets in the third flow queue");
431 NS_TEST_ASSERT_MSG_EQ (queueDisc->QueueDisc::GetNPackets (), 7,
"unexpected number of packets in the queue disc");
432 NS_TEST_ASSERT_MSG_EQ (queueDisc->GetQueueDiscClass (0)->GetQueueDisc ()->GetNPackets (), 3,
"unexpected number of packets in the first flow queue");
433 NS_TEST_ASSERT_MSG_EQ (queueDisc->GetQueueDiscClass (1)->GetQueueDisc ()->GetNPackets (), 1,
"unexpected number of packets in the second flow queue");
434 NS_TEST_ASSERT_MSG_EQ (queueDisc->GetQueueDiscClass (2)->GetQueueDisc ()->GetNPackets (), 1,
"unexpected number of packets in the third flow queue");
435 NS_TEST_ASSERT_MSG_EQ (queueDisc->GetQueueDiscClass (3)->GetQueueDisc ()->GetNPackets (), 2,
"unexpected number of packets in the third flow queue");
437 Simulator::Destroy ();
450 virtual void DoRun (
void);
455 :
TestCase (
"Test UDP flows separation")
468 queue->Enqueue (item);
476 queueDisc->SetQuantum (1500);
477 queueDisc->Initialize ();
493 NS_TEST_ASSERT_MSG_EQ (queueDisc->QueueDisc::GetNPackets (), 3,
"unexpected number of packets in the queue disc");
494 NS_TEST_ASSERT_MSG_EQ (queueDisc->GetQueueDiscClass (0)->GetQueueDisc ()->GetNPackets (), 3,
"unexpected number of packets in the first flow queue");
499 NS_TEST_ASSERT_MSG_EQ (queueDisc->QueueDisc::GetNPackets (), 4,
"unexpected number of packets in the queue disc");
500 NS_TEST_ASSERT_MSG_EQ (queueDisc->GetQueueDiscClass (0)->GetQueueDisc ()->GetNPackets (), 3,
"unexpected number of packets in the first flow queue");
501 NS_TEST_ASSERT_MSG_EQ (queueDisc->GetQueueDiscClass (1)->GetQueueDisc ()->GetNPackets (), 1,
"unexpected number of packets in the second flow queue");
506 NS_TEST_ASSERT_MSG_EQ (queueDisc->QueueDisc::GetNPackets (), 5,
"unexpected number of packets in the queue disc");
507 NS_TEST_ASSERT_MSG_EQ (queueDisc->GetQueueDiscClass (0)->GetQueueDisc ()->GetNPackets (), 3,
"unexpected number of packets in the first flow queue");
508 NS_TEST_ASSERT_MSG_EQ (queueDisc->GetQueueDiscClass (1)->GetQueueDisc ()->GetNPackets (), 1,
"unexpected number of packets in the second flow queue");
509 NS_TEST_ASSERT_MSG_EQ (queueDisc->GetQueueDiscClass (2)->GetQueueDisc ()->GetNPackets (), 1,
"unexpected number of packets in the third flow queue");
515 NS_TEST_ASSERT_MSG_EQ (queueDisc->QueueDisc::GetNPackets (), 7,
"unexpected number of packets in the queue disc");
516 NS_TEST_ASSERT_MSG_EQ (queueDisc->GetQueueDiscClass (0)->GetQueueDisc ()->GetNPackets (), 3,
"unexpected number of packets in the first flow queue");
517 NS_TEST_ASSERT_MSG_EQ (queueDisc->GetQueueDiscClass (1)->GetQueueDisc ()->GetNPackets (), 1,
"unexpected number of packets in the second flow queue");
518 NS_TEST_ASSERT_MSG_EQ (queueDisc->GetQueueDiscClass (2)->GetQueueDisc ()->GetNPackets (), 1,
"unexpected number of packets in the third flow queue");
519 NS_TEST_ASSERT_MSG_EQ (queueDisc->GetQueueDiscClass (3)->GetQueueDisc ()->GetNPackets (), 2,
"unexpected number of packets in the third flow queue");
521 Simulator::Destroy ();
554 virtual void DoRun (
void);
559 :
TestCase (
"Test credits and flows status")
571 queue->Enqueue (item);
578 queueDisc->SetQuantum (90);
579 queueDisc->Initialize ();
582 queueDisc->AddPacketFilter (filter);
612 "unexpected number of packets in the queue disc");
614 "unexpected number of packets in the first flow queue of set one");
616 "unexpected number of packets in the second flow queue of set one");
618 "unexpected number of packets in the third flow queue of set one");
620 "unexpected number of packets in the fourth flow queue of set one");
622 "unexpected number of packets in the fifth flow queue of set one");
624 "unexpected number of packets in the sixth flow queue of set one");
626 "unexpected number of packets in the seventh flow queue of set one");
628 "unexpected number of packets in the eighth flow queue of set one");
632 "unexpected number of packets in the first flow of set one");
636 "unexpected number of packets in the first flow of set two");
637 Simulator::Destroy ();
659 virtual void DoRun (
void);
678 for (uint32_t i = 0; i < nPkt; i++)
681 queue->Enqueue (item);
688 for (uint32_t i = 0; i < nPkt; i++)
697 for (uint32_t i = 0; i < nPkt; i++)
706 for (uint32_t i = 0; i < nPkt; i++)
724 queueDisc->SetQuantum (1514);
725 queueDisc->Initialize ();
731 hdr.
SetEcn (Ipv4Header::ECN_ECT1);
735 double delay = 0.0005;
739 hdr.
SetEcn (Ipv4Header::ECN_ECT0);
746 Simulator::Stop (
Seconds (10.0));
752 NS_TEST_EXPECT_MSG_EQ (q0->GetStats ().GetNMarkedPackets (PieQueueDisc::CE_THRESHOLD_EXCEEDED_MARK), 66,
"There should be 66 marked packets"
753 "4th packet is enqueued at 2ms and dequeued at 4ms hence the delay of 2ms which not greater than CE threshold"
754 "5th packet is enqueued at 2.5ms and dequeued at 5ms hence the delay of 2.5ms and subsequent packet also do have delay"
755 "greater than CE threshold so all the packets after 4th packet are marked");
756 NS_TEST_EXPECT_MSG_EQ (q0->GetStats ().GetNDroppedPackets (PieQueueDisc::UNFORCED_DROP), 0,
"Queue delay is less than max burst allowance so"
757 "There should not be any dropped packets");
758 NS_TEST_EXPECT_MSG_EQ (q0->GetStats ().GetNMarkedPackets (PieQueueDisc::UNFORCED_MARK), 0,
"There should not be any marked packets");
759 NS_TEST_EXPECT_MSG_EQ (q1->GetStats ().GetNMarkedPackets (PieQueueDisc::UNFORCED_MARK), 0,
"There should not be marked packets.");
760 NS_TEST_EXPECT_MSG_EQ (q1->GetStats ().GetNDroppedPackets (PieQueueDisc::UNFORCED_DROP), 0,
"There should not be any dropped packets");
762 Simulator::Destroy ();
765 queueDisc = CreateObjectWithAttributes<FqPieQueueDisc> (
"MaxSize",
StringValue (
"10240p"),
769 queueDisc->SetQuantum (1514);
770 queueDisc->Initialize ();
775 hdr.
SetEcn (Ipv4Header::ECN_ECT1);
784 hdr.
SetEcn (Ipv4Header::ECN_ECT0);
789 Simulator::Stop (
Seconds (1.0));
791 q0 = queueDisc->GetQueueDiscClass (0)->GetQueueDisc ()->GetObject <
PieQueueDisc> ();
792 q0 = queueDisc->GetQueueDiscClass (0)->GetQueueDisc ()->GetObject <
PieQueueDisc> ();
794 NS_TEST_EXPECT_MSG_EQ (q0->GetStats ().GetNMarkedPackets (PieQueueDisc::CE_THRESHOLD_EXCEEDED_MARK), 68,
"There should be 68 marked packets"
795 "2nd ECT1 packet is enqueued at 1.5ms and dequeued at 3ms hence the delay of 1.5ms which not greater than CE threshold"
796 "3rd packet is enqueued at 2.5ms and dequeued at 5ms hence the delay of 2.5ms and subsequent packet also do have delay"
797 "greater than CE threshold so all the packets after 2nd packet are marked");
798 NS_TEST_EXPECT_MSG_EQ (q0->GetStats ().GetNDroppedPackets (PieQueueDisc::UNFORCED_DROP), 0,
"Queue delay is less than max burst allowance so"
799 "There should not be any dropped packets");
800 NS_TEST_EXPECT_MSG_EQ (q0->GetStats ().GetNMarkedPackets (PieQueueDisc::UNFORCED_MARK), 0,
"There should not be any marked packets");
802 Simulator::Destroy ();
This class tests the deficit per flow.
virtual void DoRun(void)
Implementation to actually run this TestCase.
virtual ~FqPieQueueDiscDeficit()
void AddPacket(Ptr< FqPieQueueDisc > queue, Ipv4Header hdr)
This class tests the IP flows separation and the packet limit.
void AddPacket(Ptr< FqPieQueueDisc > queue, Ipv4Header hdr)
FqPieQueueDiscIPFlowsSeparationAndPacketLimit()
virtual ~FqPieQueueDiscIPFlowsSeparationAndPacketLimit()
virtual void DoRun(void)
Implementation to actually run this TestCase.
This class tests L4S mode.
void AddPacketWithDelay(Ptr< FqPieQueueDisc > queue, Ipv4Header hdr, double delay, uint32_t nPkt)
void DequeueWithDelay(Ptr< FqPieQueueDisc > queue, double delay, uint32_t nPkt)
virtual void DoRun(void)
Implementation to actually run this TestCase.
void AddPacket(Ptr< FqPieQueueDisc > queue, Ipv4Header hdr, u_int32_t nPkt)
void Dequeue(Ptr< FqPieQueueDisc > queue, uint32_t nPkt)
virtual ~FqPieQueueDiscL4sMode()
This class tests packets for which there is no suitable filter.
FqPieQueueDiscNoSuitableFilter()
virtual ~FqPieQueueDiscNoSuitableFilter()
virtual void DoRun(void)
Implementation to actually run this TestCase.
FqPieQueueDiscSetLinearProbing()
virtual ~FqPieQueueDiscSetLinearProbing()
void AddPacket(Ptr< FqPieQueueDisc > queue, Ipv4Header hdr)
virtual void DoRun(void)
Implementation to actually run this TestCase.
This class tests the TCP flows separation.
virtual void DoRun(void)
Implementation to actually run this TestCase.
FqPieQueueDiscTCPFlowsSeparation()
void AddPacket(Ptr< FqPieQueueDisc > queue, Ipv4Header ipHdr, TcpHeader tcpHdr)
virtual ~FqPieQueueDiscTCPFlowsSeparation()
FqPieQueueDiscTestSuite()
This class tests the UDP flows separation.
virtual void DoRun(void)
Implementation to actually run this TestCase.
virtual ~FqPieQueueDiscUDPFlowsSeparation()
void AddPacket(Ptr< FqPieQueueDisc > queue, Ipv4Header ipHdr, UdpHeader udpHdr)
FqPieQueueDiscUDPFlowsSeparation()
Simple test packet filter able to classify IPv4 packets.
Ipv4FqPieTestPacketFilter()
virtual int32_t DoClassify(Ptr< QueueDiscItem > item) const
Classify a packet.
virtual bool CheckProtocol(Ptr< QueueDiscItem > item) const
Checks if the filter is able to classify a kind of items.
virtual ~Ipv4FqPieTestPacketFilter()
static TypeId GetTypeId(void)
Get the type ID.
a polymophic address class
AttributeValue implementation for Boolean.
Ipv4 addresses are stored in host order in this class.
Ipv4PacketFilter is the abstract base class for filters defined for IPv4 packets.
void AddHeader(const Header &header)
Add header to this packet.
Implements PIE Active Queue Management discipline.
Smart pointer class similar to boost::intrusive_ptr.
Hold variables of type string.
void AddTestCase(TestCase *testCase, TestDuration duration=QUICK)
Add an individual child TestCase to this test suite.
Simulation virtual time values and global simulation resolution.
AttributeValue implementation for Time.
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Hold an unsigned integer type.
static FqPieQueueDiscTestSuite FqPieQueueDiscTestSuite
@ INACTIVE
Inactive Period or unslotted CSMA-CA.
#define NS_TEST_ASSERT_MSG_EQ(actual, limit, msg)
Test that an actual and expected (limit) value are equal and report and abort if not.
#define NS_TEST_EXPECT_MSG_EQ(actual, limit, msg)
Test that an actual and expected (limit) value are equal and report if not.
Time Seconds(double value)
Construct a Time in the indicated unit.
Time MilliSeconds(uint64_t value)
Construct a Time in the indicated unit.
Every class exported by the ns3 library is enclosed in the ns3 namespace.