#include <ConstSpeedMobility.h>
Inherits BasicMobility.
Inheritance diagram for ConstSpeedMobility:
Public Member Functions | |
Module_Class_Members (ConstSpeedMobility, BasicMobility, 0) | |
virtual void | initialize (int) |
Initializes mobility model parameters. | |
Protected Member Functions | |
virtual void | setTargetPosition () |
Calculate the target position to move to. | |
virtual void | makeMove () |
Move the host. | |
Protected Attributes | |
Coord | targetPos |
Coord | stepTarget |
Coord | stepSize |
parameters to handle the movement of the hostSize of a step | |
int | numSteps |
Total number of steps. | |
int | step |
Number of steps already moved. |
Parameters to be specified in omnetpp.ini
|
Initializes mobility model parameters. Reads the updateInterval and the velocity If the host is not stationary it calculates a random position and schedules a timer to trigger the first movement Reimplemented from BasicMobility. |
|
Move the host. Move the host if the destination is not reached yet. Otherwise calculate a new random position Reimplemented from BasicMobility. |
|
Calculate the target position to move to. Calculate a new random position and the number of steps the host needs to reach this position |