#include <mobility-model.h>
Public Member Functions | |
Vector | GetPosition (void) const |
void | SetPosition (const Vector &position) |
Vector | GetVelocity (void) const |
double | GetDistanceFrom (Ptr< const MobilityModel > position) const |
Static Public Member Functions | |
static TypeId | GetTypeId (void) |
This method returns the TypeId associated to ns3::MobilityModel. | |
Protected Member Functions | |
void | NotifyCourseChange (void) const |
Private Member Functions | |
virtual Vector | DoGetPosition (void) const =0 |
virtual void | DoSetPosition (const Vector &position)=0 |
virtual Vector | DoGetVelocity (void) const =0 |
Private Attributes | |
TracedCallback< Ptr< const MobilityModel > > | m_courseChangeTrace |
All space coordinates in this class and its subclasses are understood to be meters or meters/s. i.e., they are all metric international units.
virtual Vector ns3::MobilityModel::DoGetPosition | ( | void | ) | const [private, pure virtual] |
Implemented in ns3::ConstantAccelerationMobilityModel, ns3::ConstantPositionMobilityModel, ns3::ConstantVelocityMobilityModel, ns3::HierarchicalMobilityModel, ns3::RandomDirection2dMobilityModel, ns3::RandomWalk2dMobilityModel, and ns3::RandomWaypointMobilityModel.
virtual Vector ns3::MobilityModel::DoGetVelocity | ( | void | ) | const [private, pure virtual] |
Implemented in ns3::ConstantAccelerationMobilityModel, ns3::ConstantPositionMobilityModel, ns3::ConstantVelocityMobilityModel, ns3::HierarchicalMobilityModel, ns3::RandomDirection2dMobilityModel, ns3::RandomWalk2dMobilityModel, and ns3::RandomWaypointMobilityModel.
virtual void ns3::MobilityModel::DoSetPosition | ( | const Vector & | position | ) | [private, pure virtual] |
position | the position to set. |
Implemented in ns3::ConstantAccelerationMobilityModel, ns3::ConstantPositionMobilityModel, ns3::ConstantVelocityMobilityModel, ns3::HierarchicalMobilityModel, ns3::RandomDirection2dMobilityModel, ns3::RandomWalk2dMobilityModel, and ns3::RandomWaypointMobilityModel.
double ns3::MobilityModel::GetDistanceFrom | ( | Ptr< const MobilityModel > | position | ) | const |
position | a reference to another mobility model |
Vector ns3::MobilityModel::GetPosition | ( | void | ) | const |
static TypeId ns3::MobilityModel::GetTypeId | ( | void | ) | [static] |
This method returns the TypeId associated to ns3::MobilityModel.
This object is accessible through the following paths with Config::Set and Config::Connect:
Reimplemented from ns3::Object.
Reimplemented in ns3::ConstantAccelerationMobilityModel, ns3::ConstantPositionMobilityModel, ns3::ConstantVelocityMobilityModel, ns3::HierarchicalMobilityModel, ns3::RandomDirection2dMobilityModel, ns3::RandomWalk2dMobilityModel, and ns3::RandomWaypointMobilityModel.
Vector ns3::MobilityModel::GetVelocity | ( | void | ) | const |
void ns3::MobilityModel::NotifyCourseChange | ( | void | ) | const [protected] |
Must be invoked by subclasses when the course of the position changes to notify course change listeners.
void ns3::MobilityModel::SetPosition | ( | const Vector & | position | ) |
position | the position to set. |
TracedCallback<Ptr<const MobilityModel> > ns3::MobilityModel::m_courseChangeTrace [private] |
Used to alert subscribers that a change in direction, velocity, or position has occurred.