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")
85 "Speed",
StringValue (
"ns3::ConstantRandomVariable[Constant=1.0]"),
96 MobilityHelper::EnableAsciiAll (ascii.
CreateFileStream (testMobilityFilePath));
97 Simulator::Stop (Seconds (5.0));
99 Simulator::Destroy ();
Manage ASCII trace files for device models.
hold variables of type string
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. ...
int64_t AssignStreams(NodeContainer c, int64_t stream)
Assign a fixed random variable stream number to the random variables used by the mobility models (inc...
hold objects of type ns3::Rectangle
void Install(Ptr< Node > node) const
"Layout" a single node according to the current position allocator type.
Hold an unsigned integer type.
#define NS_ASCII_TEST_EXPECT_EQ(gotFilename, expectedFilename)
Test that a pair of new/reference ascii files are equal.
static MobilityTraceTestSuite mobilityTraceTestSuite
keep track of a set of node pointers.
std::string CreateDataDirFilename(std::string filename)
virtual void DoRun(void)
Implementation to actually run this TestCase.
void SetMobilityModel(std::string type, std::string n1="", const AttributeValue &v1=EmptyAttributeValue(), std::string n2="", const AttributeValue &v2=EmptyAttributeValue(), std::string n3="", const AttributeValue &v3=EmptyAttributeValue(), std::string n4="", const AttributeValue &v4=EmptyAttributeValue(), std::string n5="", const AttributeValue &v5=EmptyAttributeValue(), std::string n6="", const AttributeValue &v6=EmptyAttributeValue(), std::string n7="", const AttributeValue &v7=EmptyAttributeValue(), std::string n8="", const AttributeValue &v8=EmptyAttributeValue(), std::string n9="", const AttributeValue &v9=EmptyAttributeValue())
void AddTestCase(TestCase *testCase) NS_DEPRECATED
Add an individual child TestCase case to this TestCase.
Helper class used to assign positions and mobility models to nodes.
std::string CreateTempDirFilename(std::string filename)
void SetDataDir(std::string directory)
void Create(uint32_t n)
Create n nodes and append pointers to them to the end of this NodeContainer.
virtual ~MobilityTraceTestCase()
void SetPositionAllocator(Ptr< PositionAllocator > allocator)
Set the position allocator which will be used to allocate the initial position of every node initiali...
Hold a floating point type.