23 #include "ns3/core-module.h" 
   24 #include "ns3/network-module.h" 
   25 #include "ns3/internet-module.h" 
   26 #include "ns3/point-to-point-module.h" 
   27 #include "ns3/netanim-module.h" 
   28 #include "ns3/applications-module.h" 
   29 #include "ns3/point-to-point-layout-module.h" 
   30 #include "ns3/basic-energy-source.h" 
   31 #include "ns3/simple-device-energy-model.h" 
   75   virtual void PrepareNetwork () = 0;
 
   78   virtual void CheckLogic () = 0;
 
   81   virtual void CheckFileExistence ();
 
   87   TestCase (name), m_anim (NULL), m_traceFileName (
"netanim-test.xml")
 
  106   Simulator::Destroy ();
 
  151   AnimationInterface::SetConstantPosition (
m_nodes.
Get (0), 0 , 10);
 
  152   AnimationInterface::SetConstantPosition (
m_nodes.
Get (1), 1 , 10);
 
  155   pointToPoint.SetDeviceAttribute (
"DataRate", 
StringValue (
"5Mbps"));
 
  156   pointToPoint.SetChannelAttribute (
"Delay", 
StringValue (
"2ms"));
 
  159   devices = pointToPoint.Install (
m_nodes);
 
  165   address.
SetBase (
"10.1.1.0", 
"255.255.255.0");
 
  220   m_initialEnergy (100)
 
  233   m_energyModel->SetCurrentA (20);
 
  236   AnimationInterface::SetConstantPosition (
m_nodes.
Get (0), 0 , 10);
 
  253                             "Wrong remaining energy value was traced");
 
holds a vector of ns3::Application pointers. 
 
uint64_t GetTracePktCount()
Get trace file packet count (This used only for testing) 
 
AnimationInterface * m_anim
animation 
 
virtual void DoRun(void)
Run unit tests for this class. 
 
virtual void CheckFileExistence()
Check file existence. 
 
holds a vector of std::pair of Ptr and interface index. 
 
Hold variables of type string. 
 
virtual void PrepareNetwork()=0
Prepare network function. 
 
void AggregateObject(Ptr< Object > other)
Aggregate two Objects together. 
 
AbstractAnimationInterfaceTestCase(std::string name)
Constructor. 
 
virtual double GetRemainingEnergy(void)
 
Create an application which sends a UDP packet and waits for an echo of this packet. 
 
aggregate IP/TCP/UDP functionality to existing Nodes. 
 
AnimationInterfaceTestSuite g_animationInterfaceTestSuite
the test suite 
 
Build a set of PointToPointNetDevice objects. 
 
This test suite implements a Unit Test. 
 
Animation Interface Test Case. 
 
Ptr< SimpleDeviceEnergyModel > m_energyModel
energy model 
 
ApplicationContainer Install(Ptr< Node > node) const 
Create a UdpEchoServerApplication on the specified Node. 
 
const double m_initialEnergy
initial energy 
 
Create a server application which waits for input UDP packets and sends them back to the original sen...
 
virtual void CheckLogic()
Check logic function. 
 
Ptr< BasicEnergySource > m_energySource
energy source 
 
AnimationRemainingEnergyTestCase()
Constructor. 
 
virtual void CheckLogic()
Check logic function. 
 
AttributeValue implementation for Time. 
 
virtual void PrepareNetwork()
Prepare network function. 
 
void AddTestCase(TestCase *testCase, TestDuration duration=QUICK)
Add an individual child TestCase to this test suite. 
 
virtual void PrepareNetwork()
Prepare network function. 
 
Hold an unsigned integer type. 
 
#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. 
 
double GetNodeEnergyFraction(Ptr< const Node > node) const 
Get node's energy fraction (This used only for testing) 
 
holds a vector of ns3::NetDevice pointers 
 
void Start(Time start)
Arrange for all of the Applications in this container to Start() at the Time given as a parameter...
 
#define NS_TEST_ASSERT_MSG_EQ_TOL(actual, limit, tol, msg)
Test that actual and expected (limit) values are equal to plus or minus some tolerance and report and...
 
Animation Interface Test Suite. 
 
const char * m_traceFileName
trace file name 
 
Every class exported by the ns3 library is enclosed in the ns3 namespace. 
 
keep track of a set of node pointers. 
 
void AppendDeviceEnergyModel(Ptr< DeviceEnergyModel > deviceEnergyModelPtr)
 
NodeContainer m_nodes
the nodes 
 
AnimationInterfaceTestCase()
Constructor. 
 
void Install(std::string nodeName) const 
Aggregate implementations of the ns3::Ipv4, ns3::Ipv6, ns3::Udp, and ns3::Tcp classes onto the provid...
 
Animation Remaining Energy Test Case. 
 
Abstract Animation Interface Test Case. 
 
AnimationInterfaceTestSuite()
 
virtual ~AbstractAnimationInterfaceTestCase()
Destructor. 
 
void Stop(Time stop)
Arrange for all of the Applications in this container to Stop() at the Time given as a parameter...
 
Ipv4InterfaceContainer Assign(const NetDeviceContainer &c)
Assign IP addresses to the net devices specified in the container based on the current network prefix...
 
#define NS_TEST_ASSERT_MSG_NE(actual, limit, msg)
Test that an actual and expected (limit) value are not equal and report and abort if not...
 
Ptr< Node > Get(uint32_t i) const 
Get the Ptr stored in this container at a given index. 
 
Time Seconds(double value)
Construct a Time in the indicated unit. 
 
Interface to network animator. 
 
A helper class to make life easier while doing simple IPv4 address assignment in scripts. 
 
void SetInitialEnergy(double initialEnergyJ)
 
void Create(uint32_t n)
Create n nodes and append pointers to them to the end of this NodeContainer. 
 
virtual void CheckLogic()=0
Check logic function. 
 
void SetBase(Ipv4Address network, Ipv4Mask mask, Ipv4Address base="0.0.0.1")
Set the base network number, network mask and base address. 
 
Ipv4Address GetAddress(uint32_t i, uint32_t j=0) const