|
AntHocNet 2.0.0
Paper-faithful ant-colony ad hoc routing: the shared core and its adapters
|
Node-local MAC-layer signals for the congestion-aware per-hop metric (item 10/A2, [1] §3.2). More...
#include <anthocnet/core/ports.h>
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. | |
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.
|
virtualdefault |
|
pure virtual |
Packets currently queued for transmission toward nextHop (those a newly-enqueued packet would wait behind).
Returns >= 0; negative is treated as 0.
|
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).