awds::Metric Class Reference

#include <Metric.h>

Inheritance diagram for awds::Metric:

awds::EtxMetric

List of all members.

Public Member Functions

 Metric (Routing *r)
virtual void addNode (const NodeId &nodeId)
virtual void delNode (const NodeId &nodeId)
virtual void begin_update ()
virtual void end_update ()
virtual int update ()
RTopology::link_quality_t get_quality (NodeDescr &ndescr)
unsigned long calculate (RTopology::LinkList::iterator &it)

Protected Member Functions

virtual RTopology::link_quality_t my_get_quality (NodeDescr &ndescr)
virtual unsigned long my_calculate (RTopology::link_quality_t forward, RTopology::link_quality_t backward)

Protected Attributes

Routingrouting


Detailed Description

The Metric class is the base class for all metrics. It implements the famouse Hop Count Metric that returns the same weight for every link. Feel free to implement a better one by creating a subclass.

Member Function Documentation

virtual void awds::Metric::addNode ( const NodeId nodeId  )  [inline, virtual]

called to add a new neighbour to the metric table

virtual void awds::Metric::delNode ( const NodeId nodeId  )  [inline, virtual]

called to remove a neighbour from the metric table.

virtual void awds::Metric::begin_update (  )  [inline, virtual]

begin_update() is called before the incoming topopaket is parsed, so that the metric can reset its node data, see end_update() too

virtual void awds::Metric::end_update (  )  [inline, virtual]

end_update() is called right after the topopaket has been parsed, so still reseted nodes can be deleted, so begin_update() too

virtual int awds::Metric::update (  )  [inline, virtual]

update() is called right before a topopacket ist filled with data (

See also:
get_quality(NodeDescr&)) so the mertic can prepare for (for TTMetric in rl it is to parse a file)

RTopology::link_quality_t awds::Metric::get_quality ( NodeDescr &  ndescr  )  [inline]

this method is called by the Topopacket to get the sendable qualityvalues of the Link to ndescr

unsigned long awds::Metric::calculate ( RTopology::LinkList::iterator &  it  )  [inline]

on receive of a Topopacket calculate will be called on each LinkQuality to calculate the "metric_weight" depended on the quality values by the two corresponding LinkQualities


The documentation for this class was generated from the following file:
Generated on Tue Dec 11 17:58:48 2007 for AWDS by  doxygen 1.5.3-20071008