Public Member Functions | Protected Attributes

SimpleCoordsInfo Class Reference

#include <CoordinateSystem.h>

Inheritance diagram for SimpleCoordsInfo:
EuclideanNcsNodeInfo AbstractNcsNodeInfo

List of all members.

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 std::vector< double > () const

Protected Attributes

simtime_t accessDelay

Detailed Description

Definition at line 100 of file CoordinateSystem.h.


Member Function Documentation

simtime_t SimpleCoordsInfo::getAccessDelay (  )  const [inline]

Definition at line 108 of file CoordinateSystem.h.

Referenced by getDistance().

{ return accessDelay; };

Prox SimpleCoordsInfo::getDistance ( const AbstractNcsNodeInfo abstractInfo  )  const [virtual]

Reimplemented from EuclideanNcsNodeInfo.

Definition at line 160 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)));
}

bool SimpleCoordsInfo::isValid (  )  [inline, virtual]

Implements AbstractNcsNodeInfo.

Definition at line 103 of file CoordinateSystem.h.

{ return true; };

SimpleCoordsInfo::operator std::vector< double > (  )  const [virtual]

Implements AbstractNcsNodeInfo.

Definition at line 184 of file CoordinateSystem.cc.

{
    std::vector<double> 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 109 of file CoordinateSystem.h.

{ accessDelay = delay; };

bool SimpleCoordsInfo::update ( const AbstractNcsNodeInfo abstractInfo  )  [virtual]

Implements AbstractNcsNodeInfo.

Definition at line 171 of file CoordinateSystem.cc.

{
    if (!dynamic_cast<const SimpleCoordsInfo*>(&abstractInfo)) return false;

    const SimpleCoordsInfo& temp =
        static_cast<const SimpleCoordsInfo&>(abstractInfo);

    coordinates = temp.coordinates;

    return true;
}


Member Data Documentation


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