a topology object which can read ns2's movement files generated by the CMU setdest tool. More...
#include <ns2-mobility-helper.h>
Classes | |
class | ObjectStore |
Public Member Functions | |
Ns2MobilityHelper (std::string filename) | |
void | Install (void) const |
template<typename T > | |
void | Install (T begin, T end) const |
Private Member Functions | |
void | LayoutObjectStore (const ObjectStore &store) const |
Ptr< StaticSpeedMobilityModel > | GetMobilityModel (std::string idString, const ObjectStore &store) const |
double | ReadDouble (std::string valueString) const |
Private Attributes | |
std::string | m_filename |
a topology object which can read ns2's movement files generated by the CMU setdest tool.
Definition at line 36 of file ns2-mobility-helper.h.
ns3::Ns2MobilityHelper::Ns2MobilityHelper | ( | std::string | filename | ) |
filename | filename of file which contains the ns2 movement trace. |
Definition at line 34 of file ns2-mobility-helper.cc.
Ptr< StaticSpeedMobilityModel > ns3::Ns2MobilityHelper::GetMobilityModel | ( | std::string | idString, | |
const ObjectStore & | store | |||
) | const [private] |
Definition at line 41 of file ns2-mobility-helper.cc.
References ns3::Ns2MobilityHelper::ObjectStore::Get().
Referenced by LayoutObjectStore().
void ns3::Ns2MobilityHelper::Install | ( | T | begin, | |
T | end | |||
) | const [inline] |
begin | an iterator which points to the start of the input object array. | |
end | an iterator which points to the end of the input object array. |
Read the ns2 trace file and configure the movement patterns of all input objects. Each input object is identified by a unique node id which reflects the index of the object in the input array.
Definition at line 85 of file ns2-mobility-helper.h.
References ns3::TimeStepPrecision::Get(), and LayoutObjectStore().
void ns3::Ns2MobilityHelper::Install | ( | void | ) | const |
Read the ns2 trace file and configure the movement patterns of all nodes contained in the global ns3::NodeList whose nodeId is matches the nodeId of the nodes in the trace file.
Definition at line 142 of file ns2-mobility-helper.cc.
References ns3::NodeList::Begin(), and ns3::NodeList::End().
void ns3::Ns2MobilityHelper::LayoutObjectStore | ( | const ObjectStore & | store | ) | const [private] |
Definition at line 72 of file ns2-mobility-helper.cc.
References GetMobilityModel(), m_filename, NS_LOG_DEBUG, ReadDouble(), ns3::Simulator::Schedule(), ns3::Seconds(), ns3::StaticSpeedMobilityModel::SetVelocity(), ns3::Vector::x, ns3::Vector::y, and ns3::Vector::z.
Referenced by Install().
double ns3::Ns2MobilityHelper::ReadDouble | ( | std::string | valueString | ) | const [private] |
Definition at line 62 of file ns2-mobility-helper.cc.
Referenced by LayoutObjectStore().
std::string ns3::Ns2MobilityHelper::m_filename [private] |
Definition at line 76 of file ns2-mobility-helper.h.
Referenced by LayoutObjectStore().