#include "ns2-mobility-helper.h"
#include "ns3/constant-velocity-mobility-model.h"
#include "ns3/log.h"
#include "ns3/node-list.h"
#include "ns3/node.h"
#include "ns3/simulator.h"
#include <fstream>
#include <map>
#include <sstream>
Go to the source code of this file.
Classes | |
struct | ns3::DestinationPoint |
Keeps last movement schedule. More... | |
struct | ns3::ParseResult |
Type to maintain line parsed and its values. More... | |
Namespaces | |
namespace | ns3 |
Every class exported by the ns3 library is enclosed in the ns3 namespace. | |
Macros | |
#define | NS2_AT "at" |
#define | NS2_NODEID "$node_(" |
#define | NS2_NS_SCH "$ns_" |
#define | NS2_SET "set" |
#define | NS2_SETDEST "setdest" |
#define | NS2_X_COORD "X_" |
#define | NS2_Y_COORD "Y_" |
#define | NS2_Z_COORD "Z_" |
Functions | |
static std::string | ns3::GetNodeIdFromToken (std::string str) |
Gets nodeId number in string format from the string like $node_(4) | |
static int | ns3::GetNodeIdInt (ParseResult pr) |
Get node id number in int format. | |
static std::string | ns3::GetNodeIdString (ParseResult pr) |
Get node id number in string format. | |
static bool | ns3::HasNodeIdNumber (std::string str) |
Checks if the value between brackets is a correct nodeId number. | |
static bool | ns3::IsNumber (const std::string &s) |
Checks if a string represents a number or it has others characters than digits and point. | |
static bool | ns3::IsSchedMobilityPos (ParseResult pr) |
Check if this corresponds to a line like this: $ns_ at 1 "$node_(0) set X_ 2". | |
static bool | ns3::IsSchedSetPos (ParseResult pr) |
Check if this corresponds to a line like this: $ns_ at 1 "$node_(0) setdest 2 3 4". | |
static bool | ns3::IsSetInitialPos (ParseResult pr) |
Check if this corresponds to a line like this: $node_(0) set X_ 123. | |
template<class T > | |
static bool | ns3::IsVal (const std::string &str, T &ret) |
Check if s string represents a numeric value. | |
template<class T > | |
bool | ns3::IsVal (const std::string &str, T &ret) |
Check if s string represents a numeric value. | |
static ParseResult | ns3::ParseNs2Line (const std::string &str) |
Parses a line of ns2 mobility. | |
static Vector | ns3::SetInitialPosition (Ptr< ConstantVelocityMobilityModel > model, std::string coord, double coordVal) |
Set initial position for a node. | |
static DestinationPoint | ns3::SetMovement (Ptr< ConstantVelocityMobilityModel > model, Vector lastPos, double at, double xFinalPosition, double yFinalPosition, double speed) |
Set waypoints and speed for movement. | |
static Vector | ns3::SetOneInitialCoord (Vector actPos, std::string &coord, double value) |
Add one coord to a vector position. | |
static Vector | ns3::SetSchedPosition (Ptr< ConstantVelocityMobilityModel > model, double at, std::string coord, double coordVal) |
Schedule a set of position for a node. | |
static std::string | ns3::TrimNs2Line (const std::string &str) |
Put out blank spaces at the start and end of a line. | |
#define NS2_AT "at" |
Definition at line 46 of file ns2-mobility-helper.cc.
Referenced by ns3::IsSchedMobilityPos(), and ns3::IsSchedSetPos().
#define NS2_NODEID "$node_(" |
Definition at line 52 of file ns2-mobility-helper.cc.
#define NS2_NS_SCH "$ns_" |
Definition at line 53 of file ns2-mobility-helper.cc.
Referenced by ns3::IsSchedMobilityPos(), and ns3::IsSchedSetPos().
#define NS2_SET "set" |
Definition at line 51 of file ns2-mobility-helper.cc.
Referenced by ns3::IsSchedSetPos(), and ns3::IsSetInitialPos().
#define NS2_SETDEST "setdest" |
Definition at line 50 of file ns2-mobility-helper.cc.
Referenced by ns3::IsSchedMobilityPos().
#define NS2_X_COORD "X_" |
Definition at line 47 of file ns2-mobility-helper.cc.
Referenced by ns3::IsSchedSetPos(), ns3::IsSetInitialPos(), and ns3::SetOneInitialCoord().
#define NS2_Y_COORD "Y_" |
Definition at line 48 of file ns2-mobility-helper.cc.
Referenced by ns3::IsSchedSetPos(), ns3::IsSetInitialPos(), and ns3::SetOneInitialCoord().
#define NS2_Z_COORD "Z_" |
Definition at line 49 of file ns2-mobility-helper.cc.
Referenced by ns3::IsSchedSetPos(), ns3::IsSetInitialPos(), and ns3::SetOneInitialCoord().