#include <Metric.h>
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 | |
Routing * | routing |
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 (
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