OverSim
SimpleCoordsInfo Class Reference

#include <CoordinateSystem.h>

Inheritance diagram for SimpleCoordsInfo:
EuclideanNcsNodeInfo AbstractNcsNodeInfo

Public Member Functions

bool isValid ()
Prox getDistance (const AbstractNcsNodeInfo &abstractInfo) const
bool update (const AbstractNcsNodeInfo &abstractInfo)
simtime_t getAccessDelay () const
void setAccessDelay (simtime_t delay)
 operator Coords () const
- Public Member Functions inherited from EuclideanNcsNodeInfo
 EuclideanNcsNodeInfo ()
virtual ~EuclideanNcsNodeInfo ()
uint8_t getDimension () const
double getCoords (uint8_t i) const
const CoordsgetCoords () const
void setCoords (uint8_t i, double value)
- Public Member Functions inherited from AbstractNcsNodeInfo
virtual ~AbstractNcsNodeInfo ()

Protected Attributes

simtime_t accessDelay
- Protected Attributes inherited from EuclideanNcsNodeInfo
Coords coordinates

Additional Inherited Members

- Static Public Member Functions inherited from EuclideanNcsNodeInfo
static void setDimension (uint8_t dimension)
- Static Protected Attributes inherited from EuclideanNcsNodeInfo
static uint8_t dim

Detailed Description

Definition at line 122 of file CoordinateSystem.h.

Member Function Documentation

simtime_t SimpleCoordsInfo::getAccessDelay ( ) const
inline

Definition at line 130 of file CoordinateSystem.h.

Referenced by getDistance().

{ return accessDelay; };
Prox SimpleCoordsInfo::getDistance ( const AbstractNcsNodeInfo abstractInfo) const
virtual

Reimplemented from EuclideanNcsNodeInfo.

Definition at line 201 of file CoordinateSystem.cc.

Referenced by SimpleNcs::getCoordinateBasedProx().

{
const SimpleCoordsInfo& temp =
dynamic_cast<const SimpleCoordsInfo&>(abstractInfo);
return Prox(2 * (accessDelay +
temp.getAccessDelay() +
EuclideanNcsNodeInfo::getDistance(abstractInfo)), 0.7);
}
bool SimpleCoordsInfo::isValid ( )
inlinevirtual

Implements AbstractNcsNodeInfo.

Definition at line 125 of file CoordinateSystem.h.

{ return true; };
SimpleCoordsInfo::operator Coords ( ) const
virtual

Implements AbstractNcsNodeInfo.

Definition at line 225 of file CoordinateSystem.cc.

{
Coords temp;
for (uint8_t i = 0; i < coordinates.size(); ++i) {
temp.push_back(coordinates[i]);
}
temp.push_back(SIMTIME_DBL(accessDelay));
return temp;
}
void SimpleCoordsInfo::setAccessDelay ( simtime_t  delay)
inline

Definition at line 131 of file CoordinateSystem.h.

{ accessDelay = delay; };
bool SimpleCoordsInfo::update ( const AbstractNcsNodeInfo abstractInfo)
virtual

Implements AbstractNcsNodeInfo.

Definition at line 212 of file CoordinateSystem.cc.

{
if (!dynamic_cast<const SimpleCoordsInfo*>(&abstractInfo)) return false;
const SimpleCoordsInfo& temp =
static_cast<const SimpleCoordsInfo&>(abstractInfo);
return true;
}

Member Data Documentation

simtime_t SimpleCoordsInfo::accessDelay
protected

Definition at line 136 of file CoordinateSystem.h.

Referenced by getAccessDelay(), getDistance(), and setAccessDelay().


The documentation for this class was generated from the following files: