A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ns3::ConstantVelocityMobilityModel Class Reference

Mobility model for which the current speed does not change once it has been set and until it is set again explicitely to a new value. More...

#include <constant-velocity-mobility-model.h>

+ Inheritance diagram for ns3::ConstantVelocityMobilityModel:
+ Collaboration diagram for ns3::ConstantVelocityMobilityModel:

Public Member Functions

 ConstantVelocityMobilityModel ()
virtual ~ConstantVelocityMobilityModel ()
void SetVelocity (const Vector &speed)
- Public Member Functions inherited from ns3::MobilityModel
 MobilityModel ()
virtual ~MobilityModel ()=0
int64_t AssignStreams (int64_t stream)
double GetDistanceFrom (Ptr< const MobilityModel > position) const
Vector GetPosition (void) const
double GetRelativeSpeed (Ptr< const MobilityModel > other) const
Vector GetVelocity (void) const
void SetPosition (const Vector &position)
- Public Member Functions inherited from ns3::Object
 Object ()
virtual ~Object ()
void AggregateObject (Ptr< Object > other)
void Dispose (void)
AggregateIterator GetAggregateIterator (void) const
virtual TypeId GetInstanceTypeId (void) const
template<typename T >
Ptr< T > GetObject (void) const
template<typename T >
Ptr< T > GetObject (TypeId tid) const
void Start (void)
- Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
 SimpleRefCount ()
 SimpleRefCount (const SimpleRefCount &o)
uint32_t GetReferenceCount (void) const
SimpleRefCountoperator= (const SimpleRefCount &o)
void Ref (void) const
void Unref (void) const
- Public Member Functions inherited from ns3::ObjectBase
virtual ~ObjectBase ()
void GetAttribute (std::string name, AttributeValue &value) const
bool GetAttributeFailSafe (std::string name, AttributeValue &attribute) const
void SetAttribute (std::string name, const AttributeValue &value)
bool SetAttributeFailSafe (std::string name, const AttributeValue &value)
bool TraceConnect (std::string name, std::string context, const CallbackBase &cb)
bool TraceConnectWithoutContext (std::string name, const CallbackBase &cb)
bool TraceDisconnect (std::string name, std::string context, const CallbackBase &cb)
bool TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb)

Static Public Member Functions

static TypeId GetTypeId (void)
 This method returns the TypeId associated to ns3::ConstantVelocityMobilityModel.

Private Member Functions

virtual Vector DoGetPosition (void) const
virtual Vector DoGetVelocity (void) const
virtual void DoSetPosition (const Vector &position)
void Update (void) const

Private Attributes

ConstantVelocityHelper m_helper

Additional Inherited Members

- Protected Member Functions inherited from ns3::MobilityModel
void NotifyCourseChange (void) const

Detailed Description

Mobility model for which the current speed does not change once it has been set and until it is set again explicitely to a new value.

Definition at line 35 of file constant-velocity-mobility-model.h.

Constructor & Destructor Documentation

ns3::ConstantVelocityMobilityModel::ConstantVelocityMobilityModel ( )

Create position located at coordinates (0,0,0) with speed (0,0,0).

Definition at line 35 of file constant-velocity-mobility-model.cc.

ns3::ConstantVelocityMobilityModel::~ConstantVelocityMobilityModel ( )
virtual

Definition at line 39 of file constant-velocity-mobility-model.cc.

Member Function Documentation

Vector ns3::ConstantVelocityMobilityModel::DoGetPosition ( void  ) const
privatevirtual

Definition at line 54 of file constant-velocity-mobility-model.cc.

References ns3::ConstantVelocityHelper::GetCurrentPosition(), m_helper, and ns3::ConstantVelocityHelper::Update().

+ Here is the call graph for this function:

Vector ns3::ConstantVelocityMobilityModel::DoGetVelocity ( void  ) const
privatevirtual

Definition at line 66 of file constant-velocity-mobility-model.cc.

References ns3::ConstantVelocityHelper::GetVelocity(), and m_helper.

+ Here is the call graph for this function:

void ns3::ConstantVelocityMobilityModel::DoSetPosition ( const Vector position)
privatevirtual

Definition at line 60 of file constant-velocity-mobility-model.cc.

References m_helper, ns3::MobilityModel::NotifyCourseChange(), and ns3::ConstantVelocityHelper::SetPosition().

+ Here is the call graph for this function:

TypeId ns3::ConstantVelocityMobilityModel::GetTypeId ( void  )
static

This method returns the TypeId associated to ns3::ConstantVelocityMobilityModel.

This object is accessible through the following paths with Config::Set and Config::Connect:

  • /NodeList/[i]/$ns3::MobilityModel/$ns3::ConstantVelocityMobilityModel

No Attributes defined for this type.
Attributes defined in parent class ns3::MobilityModel:

  • Position: The current position of the mobility model.
  • Velocity: The current velocity of the mobility model.

No TraceSources defined for this type.
TraceSources defined in parent class ns3::MobilityModel:

  • CourseChange: The value of the position and/or velocity vector changed

Reimplemented from ns3::MobilityModel.

Definition at line 27 of file constant-velocity-mobility-model.cc.

References ns3::TypeId::SetParent().

+ Here is the call graph for this function:

void ns3::ConstantVelocityMobilityModel::SetVelocity ( const Vector speed)
Parameters
speedthe new speed to set.

Set the current speed now to (dx,dy,dz) Unit is meters/s

Definition at line 44 of file constant-velocity-mobility-model.cc.

References m_helper, ns3::MobilityModel::NotifyCourseChange(), ns3::ConstantVelocityHelper::SetVelocity(), ns3::ConstantVelocityHelper::Unpause(), and ns3::ConstantVelocityHelper::Update().

Referenced by ns3::SetMovement().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::ConstantVelocityMobilityModel::Update ( void  ) const
private

Member Data Documentation

ConstantVelocityHelper ns3::ConstantVelocityMobilityModel::m_helper
private

The documentation for this class was generated from the following files: