Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | Related Pages

ConstSpeedMobility Class Reference
[mobility - modules handling the mobility of the hosts]

Controls all movement related things of a host. More...

#include <ConstSpeedMobility.h>

Inherits BasicMobility.

Inheritance diagram for ConstSpeedMobility:

Inheritance graph
Collaboration diagram for ConstSpeedMobility:

Collaboration graph
List of all members.

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.

Detailed Description

Controls all movement related things of a host.

Parameters to be specified in omnetpp.ini

Steffen Sroka, Marc Loebbers, Daniel Willkomm
See also:

Member Function Documentation

void ConstSpeedMobility::initialize int  stage  )  [virtual]

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.

void ConstSpeedMobility::makeMove  )  [protected, virtual]

Move the host.

Move the host if the destination is not reached yet. Otherwise calculate a new random position

Reimplemented from BasicMobility.

void ConstSpeedMobility::setTargetPosition  )  [protected, virtual]

Calculate the target position to move to.

Calculate a new random position and the number of steps the host needs to reach this position

The documentation for this class was generated from the following files:
Generated on Fri Jan 12 08:29:53 2007 for Mobility Framework by  doxygen 1.4.4