ns-3
|
Keep track of the current position and velocity of an object. More...
#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 |
double | GetRelativeSpeed (Ptr< const MobilityModel > other) const |
![]() | |
virtual TypeId | GetInstanceTypeId (void) const |
template<typename T > | |
Ptr< T > | GetObject (void) const |
template<typename T > | |
Ptr< T > | GetObject (TypeId tid) const |
void | Dispose (void) |
void | AggregateObject (Ptr< Object > other) |
AggregateIterator | GetAggregateIterator (void) const |
void | Start (void) |
![]() | |
SimpleRefCount (const SimpleRefCount &o) | |
SimpleRefCount & | operator= (const SimpleRefCount &o) |
void | Ref (void) const |
void | Unref (void) const |
uint32_t | GetReferenceCount (void) const |
![]() | |
void | SetAttribute (std::string name, const AttributeValue &value) |
bool | SetAttributeFailSafe (std::string name, const AttributeValue &value) |
void | GetAttribute (std::string name, AttributeValue &value) const |
bool | GetAttributeFailSafe (std::string name, AttributeValue &attribute) const |
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::MobilityModel. |
Protected Member Functions | |
void | NotifyCourseChange (void) const |
![]() | |
virtual void | NotifyNewAggregate (void) |
virtual void | DoStart (void) |
virtual void | DoDispose (void) |
Object (const Object &o) |
Keep track of the current position and velocity of an object.
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.
This is a base class for all specific mobility models.
double ns3::MobilityModel::GetDistanceFrom | ( | Ptr< const MobilityModel > | position | ) | const |
position | a reference to another mobility model |
References ns3::CalculateDistance().
Referenced by ns3::FriisSpectrumPropagationLossModel::DoCalcRxPowerSpectralDensity(), ns3::UanPropModelThorp::GetDelay(), ns3::UanPropModelIdeal::GetDelay(), ns3::ConstantSpeedPropagationDelayModel::GetDelay(), ns3::ItuR1238PropagationLossModel::GetLoss(), ns3::Kun2600MhzPropagationLossModel::GetLoss(), ns3::OkumuraHataPropagationLossModel::GetLoss(), ns3::ItuR1411LosPropagationLossModel::GetLoss(), ns3::ItuR1411NlosOverRooftopPropagationLossModel::GetLoss(), ns3::Cost231PropagationLossModel::GetLoss(), ns3::HybridBuildingsPropagationLossModel::GetLoss(), ns3::UanPropModelThorp::GetPathLossDb(), ns3::SimpleOfdmWimaxChannel::Send(), ns3::YansWifiChannel::Send(), and ns3::UanChannel::TxPacket().
Vector ns3::MobilityModel::GetPosition | ( | void | ) | const |
Referenced by ns3::ItuR1238PropagationLossModel::GetLoss(), ns3::OkumuraHataPropagationLossModel::GetLoss(), ns3::ItuR1411LosPropagationLossModel::GetLoss(), ns3::ItuR1411NlosOverRooftopPropagationLossModel::GetLoss(), ns3::HybridBuildingsPropagationLossModel::GetLoss(), GetTypeId(), ns3::HierarchicalMobilityModel::SetChild(), ns3::HierarchicalMobilityModel::SetParent(), ns3::SingleModelSpectrumChannel::StartTx(), and ns3::MultiModelSpectrumChannel::StartTx().
double ns3::MobilityModel::GetRelativeSpeed | ( | Ptr< const MobilityModel > | other | ) | const |
other | reference to another object's mobility model |
References GetVelocity(), ns3::Vector3D::x, ns3::Vector3D::y, and ns3::Vector3D::z.
|
static |
This method returns the TypeId associated to ns3::MobilityModel.
This object is accessible through the following paths with Config::Set and Config::Connect:
Attributes defined for this type:
TraceSources defined for this type:
Reimplemented from ns3::Object.
Reimplemented in ns3::WaypointMobilityModel, ns3::GaussMarkovMobilityModel, ns3::HierarchicalMobilityModel, ns3::SteadyStateRandomWaypointMobilityModel, ns3::BuildingsMobilityModel, ns3::RandomWalk2dMobilityModel, ns3::RandomWaypointMobilityModel, ns3::RandomDirection2dMobilityModel, ns3::ConstantVelocityMobilityModel, ns3::ConstantPositionMobilityModel, and ns3::ConstantAccelerationMobilityModel.
References ns3::TypeId::ATTR_GET, ns3::TypeId::ATTR_SET, GetPosition(), GetVelocity(), ns3::MakeTraceSourceAccessor(), ns3::TypeId::SetParent(), and SetPosition().
Vector ns3::MobilityModel::GetVelocity | ( | void | ) | const |
Referenced by GetRelativeSpeed(), and GetTypeId().
|
protected |
Must be invoked by subclasses when the course of the position changes to notify course change listeners.
Referenced by ns3::ConstantVelocityMobilityModel::SetVelocity().
void ns3::MobilityModel::SetPosition | ( | const Vector & | position | ) |
position | the position to set. |
Referenced by GetTypeId(), ns3::MobilityHelper::Install(), ns3::HierarchicalMobilityModel::SetChild(), ns3::HierarchicalMobilityModel::SetParent(), and ns3::LteHexGridEnbTopologyHelper::SetPositionAndInstallEnbDevice().