23 #include "ns3/ascii-test.h"
24 #include "ns3/trace-helper.h"
25 #include "ns3/double.h"
26 #include "ns3/uinteger.h"
27 #include "ns3/string.h"
28 #include "ns3/simulator.h"
29 #include "ns3/rectangle.h"
30 #include "ns3/mobility-model.h"
31 #include "ns3/mobility-helper.h"
32 #include "ns3/node-container.h"
52 virtual void DoRun (
void);
57 TestCase (
"Mobility Trace Test Case")
75 mobility.SetPositionAllocator (
"ns3::GridPositionAllocator",
82 mobility.SetMobilityModel (
"ns3::RandomWalk2dMobilityModel",
85 "Speed",
StringValue (
"ns3::ConstantRandomVariable[Constant=1.0]"),
96 MobilityHelper::EnableAsciiAll (ascii.
CreateFileStream (testMobilityFilePath));
97 Simulator::Stop (
Seconds (5.0));
99 Simulator::Destroy ();
#define NS_ASCII_TEST_EXPECT_EQ(gotFilename, expectedFilename)
Test that a pair of new/reference ascii files are equal.
Mobility Trace Test Case.
virtual ~MobilityTraceTestCase()
virtual void DoRun(void)
Implementation to actually run this TestCase.
Mobility Trace Test Suite.
Manage ASCII trace files for device models.
Ptr< OutputStreamWrapper > CreateFileStream(std::string filename, std::ios::openmode filemode=std::ios::out)
Create and initialize an output stream object we'll use to write the traced bits.
This class can be used to hold variables of floating point type such as 'double' or 'float'.
Helper class used to assign positions and mobility models to nodes.
keep track of a set of node pointers.
void Create(uint32_t n)
Create n nodes and append pointers to them to the end of this NodeContainer.
AttributeValue implementation for Rectangle.
Hold variables of type string.
std::string CreateDataDirFilename(std::string filename)
Construct the full path to a file in the data directory.
void AddTestCase(TestCase *testCase, TestDuration duration=QUICK)
Add an individual child TestCase to this test suite.
std::string CreateTempDirFilename(std::string filename)
Construct the full path to a file in a temporary directory.
void SetDataDir(std::string directory)
Set the data directory where reference trace files can be found.
Hold an unsigned integer type.
Time Seconds(double value)
Construct a Time in the indicated unit.
static MobilityTraceTestSuite mobilityTraceTestSuite
the test suite
Every class exported by the ns3 library is enclosed in the ns3 namespace.