20 #include "ns3/simulator.h" 21 #include "ns3/rectangle.h" 36 : m_position (position),
43 : m_position (position),
Simulation virtual time values and global simulation resolution.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
double zMin
The z coordinate of the down bound of the box.
Vector GetCurrentPosition(void) const
Get current position vector.
double GetSeconds(void) const
Get an approximation of the time stored in this instance in the indicated unit.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file...
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
double yMax
The y coordinate of the top bound of the rectangle.
double xMax
The x coordinate of the right bound of the box.
Vector m_velocity
state variable for velocity
double xMin
The x coordinate of the left bound of the rectangle.
double yMax
The y coordinate of the top bound of the box.
void Update(void) const
Update position, if not paused, from last position and time of last update.
double xMax
The x coordinate of the right bound of the rectangle.
double yMin
The y coordinate of the bottom bound of the rectangle.
double yMin
The y coordinate of the bottom bound of the box.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
void UpdateWithBounds(const Rectangle &rectangle) const
Update position, if not paused, from last position and time of last update.
void SetVelocity(const Vector &vel)
Set new velocity vector.
double zMax
The z coordinate of the up bound of the box.
static Time Now(void)
Return the current simulation virtual time.
Vector m_position
state variable for current position
Vector GetVelocity(void) const
Get velocity; if paused, will return a zero vector.
void Unpause(void)
Resume mobility from current position at current velocity.
bool m_paused
state variable for paused
void SetPosition(const Vector &position)
Set position vector.
Time m_lastUpdate
time of last update
void Pause(void)
Pause mobility at current position.
double xMin
The x coordinate of the left bound of the box.