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

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

Models the mobility of with mass, making random motions. See NED file for more info. More...

#include <MassMobility.h>

Inherits BasicMobility.

Inheritance diagram for MassMobility:

Inheritance graph
[legend]
Collaboration diagram for MassMobility:

Collaboration graph
[legend]
List of all members.

Public Types

enum  MassMobilityMsgKinds { MK_CHANGE_DIR = BasicMobility::LAST_BASIC, LAST_MASS }
 The kind field of messages. More...

Public Member Functions

 Module_Class_Members (MassMobility, BasicMobility, 0)
virtual void initialize (int)
 Initializes mobility model parameters.

Protected Member Functions

virtual void handleSelfMsg (cMessage *msg)
 Called upon arrival of a self messages.
virtual void makeMove ()
 Move the host.
virtual void fixIfHostGetsOutside ()
 Should be redefined in subclasses.

Protected Attributes

cPar * changeInterval
cPar * changeAngleBy
double currentSpeed
 speed of the host
double currentAngle
 angle of linear motion
Coord step
 calculated from speed, angle and updateInterval
Coord targetPos

Detailed Description

Models the mobility of with mass, making random motions. See NED file for more info.

Author:
Emin Ilker Cetinbas, Andras Varga


Member Enumeration Documentation

enum MassMobility::MassMobilityMsgKinds
 

The kind field of messages.

that are used internally by this class have one of these values


Member Function Documentation

void MassMobility::fixIfHostGetsOutside  )  [protected, virtual]
 

Should be redefined in subclasses.

Should invoke handleIfOutside() and pass the references to the parameters to be modified.

Additional action after border handling (such as choosing a new target position if the BorderPolicy is PLACERANDOMLY) should be implemented here.

See also:
HandleIfOutside

Reimplemented from BasicMobility.

void MassMobility::handleSelfMsg cMessage *  msg  )  [protected, virtual]
 

Called upon arrival of a self messages.

The only self message possible is to indicate a new movement.

Reimplemented from BasicMobility.

void MassMobility::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 MassMobility::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.


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