AntHocNet 2.0.0
Paper-faithful ant-colony ad hoc routing: the shared core and its adapters
Loading...
Searching...
No Matches
anthocnet::core::ILinkState Class Referenceabstract

Node-local MAC-layer signals for the congestion-aware per-hop metric (item 10/A2, [1] §3.2). More...

#include <anthocnet/core/ports.h>

Inheritance diagram for anthocnet::core::ILinkState:
ns3::anthocnet::RoutingProtocol

Public Member Functions

virtual ~ILinkState ()=default
 
virtual int macQueueLength (NodeAddress nextHop) const =0
 Packets currently queued for transmission toward nextHop (those a newly-enqueued packet would wait behind).
 
virtual Time macServiceTime (NodeAddress nextHop) const =0
 Smoothed per-packet MAC service time (seconds) toward nextHop: a running average of the time from a packet reaching the head of the interface queue to a successful transmission, including contention/retransmission — and excluding propagation, which is real delay but not congestion.
 

Detailed Description

Node-local MAC-layer signals for the congestion-aware per-hop metric (item 10/A2, [1] §3.2).

Advisory measurement only: the adapter owns the MAC, so it measures; the core turns these into a per-hop cost. Optional — when no ILinkState is injected (or the feature is gated off) the core falls back to the forward ant's wall-clock transit time, i.e. unchanged behaviour. Both queries name the next hop the cost is being computed for (#206): a multi-interface node (a satellite with one queue per ISL) has no single "the queue", and the useful congestion signal is per-next-hop. nextHop == kInvalidAddress means the caller has no single outgoing interface — the ant is being broadcast on every interface, or this node is the path's terminal — and the adapter should aggregate across interfaces. Single-interface adapters (one wifi radio) may ignore the parameter: there per-next-hop degenerates to per-node for free.

Definition at line 69 of file ports.h.

Constructor & Destructor Documentation

◆ ~ILinkState()

virtual anthocnet::core::ILinkState::~ILinkState ( )
virtualdefault

Member Function Documentation

◆ macQueueLength()

virtual int anthocnet::core::ILinkState::macQueueLength ( NodeAddress  nextHop) const
pure virtual

Packets currently queued for transmission toward nextHop (those a newly-enqueued packet would wait behind).

Returns >= 0; negative is treated as 0.

◆ macServiceTime()

virtual Time anthocnet::core::ILinkState::macServiceTime ( NodeAddress  nextHop) const
pure virtual

Smoothed per-packet MAC service time (seconds) toward nextHop: a running average of the time from a packet reaching the head of the interface queue to a successful transmission, including contention/retransmission — and excluding propagation, which is real delay but not congestion.

Returns <= 0 when no sample has been observed yet (the core then uses the unloaded reference hop time for that hop).


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