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

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

LOGO-style movement model, with the script coming from XML. See NED file for more info. More...

#include <TurtleMobility.h>

Inherits LineSegmentsMobilityBase.

Inheritance diagram for TurtleMobility:

Inheritance graph
Collaboration diagram for TurtleMobility:

Collaboration graph
List of all members.

Public Member Functions

 Module_Class_Members (TurtleMobility, LineSegmentsMobilityBase, 0)
virtual void initialize (int)
 Initializes mobility model parameters.
virtual void setTargetPosition ()
 Overridden from LineSegmentsMobilityBase. Invokes resumeScript().
virtual void fixIfHostGetsOutside ()
 Overridden from LineSegmentsMobilityBase.

Protected Member Functions

void resumeScript ()
 Process next statements from script.
void executeStatement (cXMLElement *nextStatement)
 Execute the given statement.
double getValue (const char *s)
 Parse attrs in the script -- accepts things like "uniform(10,50) as well.
void gotoNextStatement ()
 Advance nextStatement pointer.

Protected Attributes

cXMLElement * turtleScript
cXMLElement * nextStatement
double angle
BorderPolicy borderPolicy
std::stack< long > loopVars

Detailed Description

LOGO-style movement model, with the script coming from XML. See NED file for more info.

Andras Varga

Member Function Documentation

void TurtleMobility::initialize int  stage  )  [virtual]

Initializes mobility model parameters.

Reads the parameters. If the host is not stationary it calculates a random position and schedules a timer to trigger the first movement

Reimplemented from BasicMobility.

void TurtleMobility::resumeScript  )  [protected]

Process next statements from script.

Will set a new targetTime and targetPos

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