19 #include "ns3/core-module.h"
20 #include "ns3/mobility-module.h"
29 std::cout <<
Simulator::Now () <<
", model=" << mobility <<
", POS: x=" << pos.
x <<
", y=" << pos.
y
30 <<
", z=" << pos.
z <<
"; VEL:" << vel.
x <<
", y=" << vel.
y
31 <<
", z=" << vel.
z << std::endl;
34 int main (
int argc,
char *argv[])
42 cmd.
Parse (argc, argv);
51 "Rho",
StringValue (
"ns3::UniformRandomVariable[Min=0|Max=30]"));
55 "Speed",
StringValue (
"ns3::ConstantRandomVariable[Constant=1.0]"),
void InstallAll(void)
Perform the work of MobilityHelper::Install on all nodes which exist in the simulation.
double x
x coordinate of vector
smart pointer class similar to boost::intrusive_ptr
hold variables of type string
int main(int argc, char *argv[])
static void Run(void)
Run the simulation until one of:
Vector GetPosition(void) const
void Connect(std::string path, const CallbackBase &cb)
Vector GetVelocity(void) const
Callback< R > MakeCallback(R(T::*memPtr)(void), OBJ objPtr)
Parse command-line arguments.
static void Destroy(void)
Every event scheduled by the Simulator::insertAtDestroy method is invoked.
void SetDefault(std::string name, const AttributeValue &value)
keep track of a set of node pointers.
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())
double y
y coordinate of vector
static Time Now(void)
Return the "current simulation time".
Helper class used to assign positions and mobility models to nodes.
static void Stop(void)
If an event invokes this method, it will be the last event scheduled by the Simulator::run method bef...
void Parse(int argc, char *argv[])
Parse the program arguments.
void Create(uint32_t n)
Create n nodes and append pointers to them to the end of this NodeContainer.
void SetPositionAllocator(Ptr< PositionAllocator > allocator)
Set the position allocator which will be used to allocate the initial position of every node initiali...
static void CourseChange(std::string foo, Ptr< const MobilityModel > mobility)
double z
z coordinate of vector