Position Class Reference

#include <node-core.h>

Inheritance diagram for Position:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 Position ()
virtual ~Position ()
virtual double getX ()
virtual double getY ()
virtual double getZ ()
virtual double getDist (Position *p)
virtual double getRelAzimuth (Position *p)
virtual double getRelZenith (Position *p)
virtual void setX (double x)
virtual void setY (double y)
virtual void setZ (double z)
virtual int command (int argc, const char *const *argv)

Protected Attributes

double x_
double y_
double z_

Detailed Description

The POSITION class is a TclObject in which are defined the spatial coordinates of the node, in terms of x-axis and y-axis [m.]

See also:
NodeCore

Definition at line 52 of file node-core.h.


Constructor & Destructor Documentation

Position::Position (  ) 

Position constructor

Definition at line 44 of file node-core.cc.

Position::~Position (  )  [virtual]

Position destructor

Definition at line 49 of file node-core.cc.


Member Function Documentation

double Position::getX (  )  [virtual]

Get the current projection on x-axis of the node postion

Returns:
the current projection on x-axis of the node postion

Reimplemented in BMPosition, GMPosition, and GroupMobPosition.

Definition at line 95 of file node-core.cc.

References x_.

Referenced by command(), MFullPropagation::command(), GroupMobPosition::distance(), WirelessPhyTracer::format(), AodvModule::forward(), getDist(), WirelessChModule::getInfluencedNodes(), WirelessChModule::getPropDelay(), DumbWirelessChModule::getPropDelay(), UmtsWirelessChModule::getPropDelay(), getRelAzimuth(), getRelZenith(), SimplePathLoss::Pr(), MrclTwoRayGround::Pr(), MrclFreeSpace::Pr(), AodvModule::sendRequest(), MFullPropagation::Shadowing(), and GroupMobPosition::update().

double Position::getY (  )  [virtual]

Get the current projection on y-axis of the node postion

Returns:
the current projection on y-axis of the node postion

Reimplemented in BMPosition, GMPosition, and GroupMobPosition.

Definition at line 100 of file node-core.cc.

References y_.

Referenced by command(), MFullPropagation::command(), GroupMobPosition::distance(), WirelessPhyTracer::format(), AodvModule::forward(), getDist(), WirelessChModule::getInfluencedNodes(), WirelessChModule::getPropDelay(), DumbWirelessChModule::getPropDelay(), UmtsWirelessChModule::getPropDelay(), getRelAzimuth(), getRelZenith(), SimplePathLoss::Pr(), MrclTwoRayGround::Pr(), MrclFreeSpace::Pr(), AodvModule::sendRequest(), MFullPropagation::Shadowing(), and GroupMobPosition::update().

double Position::getZ (  )  [virtual]

Get the current projection on z-axis of the node postion

Returns:
the current projection on z-axis of the node postion

Definition at line 105 of file node-core.cc.

References z_.

Referenced by command(), getDist(), and getRelZenith().

double Position::getDist ( Position p  )  [virtual]

Returns the distance from the other given position object

Parameters:
p pointer to the other given position object
Returns:
distance

Definition at line 110 of file node-core.cc.

References getX(), getY(), and getZ().

Referenced by MPhyTracer::format(), MFullPropagation::getGain(), and MFreeSpace::getGain().

Here is the call graph for this function:

double Position::getRelAzimuth ( Position p  )  [virtual]

Return the relative azimuth (angle on the ) of *p with respect to *this

Parameters:
p 
Returns:
azimuth in [-pi/2, pi/2]

Definition at line 119 of file node-core.cc.

References getX(), and getY().

Here is the call graph for this function:

double Position::getRelZenith ( Position p  )  [virtual]

Return the relative zenith (polar angle in spherical coordinates) of *p with respect to *this

Parameters:
p 
Returns:
zenith (polar angle) in [-pi/2, pi/2]

Definition at line 127 of file node-core.cc.

References getX(), getY(), and getZ().

Here is the call graph for this function:

void Position::setX ( double  x  )  [virtual]

Set the projection on x-axis of the node postion

Parameters:
x value to be set as projection on the x-axis of the node position

Definition at line 136 of file node-core.cc.

References x_.

Referenced by command().

void Position::setY ( double  y  )  [virtual]

Set the projection on y-axis of the node postion

Parameters:
y value to be set as projection on the y-axis of the node position

Definition at line 141 of file node-core.cc.

References y_.

Referenced by command().

void Position::setZ ( double  z  )  [virtual]

Set the projection on z-axis of the node postion

Parameters:
z value to be set as projection on the z-axis of the node position

Definition at line 147 of file node-core.cc.

References z_.

Referenced by command().

int Position::command ( int  argc,
const char *const *  argv 
) [virtual]

TCL command interpreter. It implements the following OTcl methods:

Moreover it inherits all the OTcl method of TclObject

Parameters:
argc number of arguments in argv
argv array of strings which are the comand parameters (Note that argv[0] is the name of the object)
Returns:
TCL_OK or TCL_ERROR whether the command has been dispatched succesfully or no

Reimplemented in BMPosition, GMPosition, and GroupMobPosition.

Definition at line 53 of file node-core.cc.

References getX(), getY(), getZ(), setX(), setY(), and setZ().

Referenced by GroupMobPosition::command(), GMPosition::command(), and BMPosition::command().

Here is the call graph for this function:


Member Data Documentation

double Position::x_ [protected]

X-axis projection value of the node postion

Definition at line 160 of file node-core.h.

Referenced by BMPosition::command(), getX(), GroupMobPosition::getX(), GMPosition::getX(), BMPosition::getX(), setX(), GroupMobPosition::update(), GMPosition::update(), and BMPosition::update().

double Position::y_ [protected]

Y-axis projection value of the node postion

Definition at line 162 of file node-core.h.

Referenced by BMPosition::command(), getY(), GroupMobPosition::getY(), GMPosition::getY(), BMPosition::getY(), setY(), GroupMobPosition::update(), GMPosition::update(), and BMPosition::update().

double Position::z_ [protected]

Z-axis projection value of the node postion

Definition at line 164 of file node-core.h.

Referenced by getZ(), and setZ().


The documentation for this class was generated from the following files:
Generated on Wed Nov 26 15:52:10 2008 for NS-MIRACLE library by  doxygen 1.5.2