#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) |
uint32_t | calculate (RTopology::LinkList::iterator &it) |
Protected Member Functions | |
virtual RTopology::link_quality_t | my_get_quality (NodeDescr &ndescr) |
virtual uint32_t | 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
Referenced by awds::RTopology::feed().
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
Reimplemented in awds::PktPair, and awds::RTTMetric.
Referenced by awds::RTopology::feed().
uint32_t 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
Referenced by awds::RTopology::feed().
virtual void awds::Metric::delNode | ( | const NodeId & | nodeId | ) | [inline, virtual] |
called to remove a neighbour from the metric table.
Referenced by awds::RTopology::feed().
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
Reimplemented in awds::PktPair, and awds::RTTMetric.
Referenced by awds::RTopology::feed().
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
Referenced by awds::TopoPacket::setNeigh().
virtual int awds::Metric::update | ( | ) | [inline, virtual] |
update() is called right before a topopacket ist filled with data (
Referenced by awds::TopoPacket::setNeigh().