21 #include "hello-regression-test.h"
22 #include "ns3/simulator.h"
23 #include "ns3/random-variable-stream.h"
24 #include "ns3/rng-seed-manager.h"
25 #include "ns3/double.h"
26 #include "ns3/uinteger.h"
27 #include "ns3/string.h"
28 #include "ns3/pcap-file.h"
29 #include "ns3/olsr-helper.h"
30 #include "ns3/internet-stack-helper.h"
31 #include "ns3/point-to-point-helper.h"
32 #include "ns3/ipv4-address-helper.h"
33 #include "ns3/abort.h"
34 #include "ns3/pcap-test.h"
43 HelloRegressionTest::HelloRegressionTest() :
44 TestCase (
"Test OLSR Hello messages generation"),
49 HelloRegressionTest::~HelloRegressionTest()
80 NS_TEST_ASSERT_MSG_EQ (streamsUsed, 2,
"Should have assigned 2 streams");
88 ipv4.
SetBase (
"10.1.1.0",
"255.255.255.0");
97 for (uint32_t i = 0; i < 2; ++i)
99 NS_PCAP_TEST_EXPECT_EQ (
PREFIX <<
"-" << i <<
"-1.pcap");
hold variables of type string
NetDeviceContainer Install(NodeContainer c)
int64_t AssignStreams(NodeContainer c, int64_t stream)
const Time m_time
Total simulation time.
aggregate IP/TCP/UDP functionality to existing Nodes.
Helper class that adds OLSR routing to nodes.
Build a set of PointToPointNetDevice objects.
void SetDeviceAttribute(std::string name, const AttributeValue &value)
static void SetRun(uint64_t run)
Set the run number of simulation.
void EnablePcapAll(std::string prefix, bool promiscuous=false)
Enable pcap output on each device (which is of the appropriate type) in the set of all nodes created ...
holds a vector of ns3::NetDevice pointers
static void Destroy(void)
keep track of a set of node pointers.
void Install(std::string nodeName) const
void SetChannelAttribute(std::string name, const AttributeValue &value)
static void SetSeed(uint32_t seed)
set the seed it will duplicate the seed value 6 times
Ipv4InterfaceContainer Assign(const NetDeviceContainer &c)
Assign IP addresses to the net devices specified in the container based on the current network prefix...
Time Seconds(double seconds)
create ns3::Time instances in units of seconds.
void CreateNodes()
Create & configure test network.
A helper class to make life easier while doing simple IPv4 address assignment in scripts.
void Create(uint32_t n)
Create n nodes and append pointers to them to the end of this NodeContainer.
static const char *const PREFIX
Unique PCAP files prefix for this test.
void SetRoutingHelper(const Ipv4RoutingHelper &routing)
void SetBase(Ipv4Address network, Ipv4Mask mask, Ipv4Address base="0.0.0.1")
Set the base network number, network mask and base address.
void CheckResults()
Compare traces with reference ones.