|
AntHocNet 2.6.1
Paper-faithful ant-colony ad hoc routing: the shared core and its adapters
|
Public Types | |
| typedef void(* | AntTxCallback) (uint8_t type, uint8_t direction, bool broadcast) |
| typedef void(* | AntRxCallback) (uint8_t type, uint8_t direction) |
| typedef void(* | RouteChangedCallback) (uint32_t dest, uint32_t neighbor, bool added) |
| typedef void(* | MacReinjectCallback) (const Ipv4Header &header, Ptr< const Packet > packet) |
Public Member Functions | |
| RoutingProtocol () | |
| ~RoutingProtocol () override | |
| void | onAntSent (::anthocnet::core::AntType type, ::anthocnet::core::AntDirection dir, bool broadcast) override |
| void | onAntReceived (::anthocnet::core::AntType type, ::anthocnet::core::AntDirection dir) override |
| void | onRouteChanged (::anthocnet::core::NodeAddress dest, ::anthocnet::core::NodeAddress nb, bool added) override |
| void | GetPheromoneDiag (Ipv4Address dest, Ipv4Address neighbor, double ®ular, double &virt) const |
| int | macQueueLength (::anthocnet::core::NodeAddress nextHop) const override |
| ::anthocnet::core::Time | macServiceTime (::anthocnet::core::NodeAddress nextHop) const override |
| double | sinrDbFrom (::anthocnet::core::NodeAddress neighbor) const override |
| void | NotifyPhyRxSinr (Ptr< const Packet > packet, double sinrDb) |
| Called by the PHY monitor hook for every received MPDU (#181). | |
| double | residualEnergyFraction () const override |
| void | SetEnergyProbe (Callback< double > probe) |
| Set the probe residualEnergyFraction() reads (#145). | |
| bool | self (::anthocnet::core::Kinematics &out) const override |
| Ptr< Ipv4Route > | RouteOutput (Ptr< Packet > p, const Ipv4Header &header, Ptr< NetDevice > oif, Socket::SocketErrno &sockerr) override |
| bool | RouteInput (Ptr< const Packet > p, const Ipv4Header &header, Ptr< const NetDevice > idev, AHN_RI_CB(UnicastForwardCallback) ucb, AHN_RI_CB(MulticastForwardCallback) mcb, AHN_RI_CB(LocalDeliverCallback) lcb, AHN_RI_CB(ErrorCallback) ecb) override |
| void | NotifyInterfaceUp (uint32_t interface) override |
| void | NotifyInterfaceDown (uint32_t interface) override |
| void | NotifyAddAddress (uint32_t interface, Ipv4InterfaceAddress address) override |
| void | NotifyRemoveAddress (uint32_t interface, Ipv4InterfaceAddress address) override |
| void | SetIpv4 (Ptr< Ipv4 > ipv4) override |
| void | PrintRoutingTable (Ptr< OutputStreamWrapper > stream, Time::Unit unit=Time::S) const override |
| int64_t | AssignStreams (int64_t stream) |
| Seed the protocol's RNG; returns the number of streams used. | |
| int64_t | AssignTimerStreams (int64_t stream) |
| #496: seed the hello/proactive timer-jitter stream (separate from the core's decision stream, so jitter draws never shift the core's sequence); returns the number of streams used. | |
| uint64_t | LinkfailPropagations () const |
| Issue #20 diagnostics: LinkFail origin/propagation split from the core (origins = antTx[linkfail] − propagations; budget drops = suppressed). | |
| uint64_t | LinkfailBudgetDrops () const |
| uint64_t | LinkfailOriginsSuppressed () const |
| uint64_t | DirectedSteers () const |
| Directed reactive discovery diagnostics: reactive forward ants unicast along the diffusion gradient instead of broadcast (EnableDirectedReactive). | |
| uint64_t | PtableEntriesRegular () const |
| Issue #133 observability: per-node pheromone-table size gauge from the core — current (neighbor, dest) entry counts, split regular vs virtual. | |
| uint64_t | PtableEntriesVirtual () const |
| Ipv4Address | StrongestNextHop (Ipv4Address dest) const |
#641 observability: the neighbour holding the most regular pheromone toward dest – the learn site's strongest-route rule – or 0.0.0.0 when there is none. | |
| const HoldStats & | HoldTimeStats () const |
| Issue #21 hold-time attribution: per-reason (setup / reconvergence / repair) pending-queue hold-time stats accumulated over the run, read by the comparison harness under –diag to locate the delay tail's dominant hold path. | |
| uint64_t | RepairDiscardedPackets () const |
| Issue #215 drop-cause breakdown, the AntHocNet-specific causes. | |
| uint64_t | RepairDiscards () const |
| Expired local repairs (the core's event count; several packets may be released per event). | |
| uint64_t | MacReinjectedPackets () const |
| Data packets a MAC retry-limit drop put back into the pending queue (#46 re-injection). | |
Public Member Functions inherited from anthocnet::core::IRouterObserver | |
| virtual | ~IRouterObserver ()=default |
| virtual void | onAntSent (AntType, AntDirection, bool) |
| This node put an ant on the medium (origination or forwarding). | |
| virtual void | onAntReceived (AntType, AntDirection) |
| This node processed a (non-duplicate) received ant. | |
| virtual void | onRouteChanged (NodeAddress, NodeAddress, bool) |
| A neighbour/route entry was added (true) or removed (false). | |
Public Member Functions inherited from anthocnet::core::ILinkState | |
| 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. | |
Public Member Functions inherited from anthocnet::core::ILinkQuality | |
| virtual | ~ILinkQuality ()=default |
| virtual double | sinrDbFrom (NodeAddress neighbor) const =0 |
Signal-to-interference-and-noise ratio (dB) of the frames this node most recently received from neighbor. | |
Public Member Functions inherited from anthocnet::core::IEnergy | |
| virtual | ~IEnergy ()=default |
Public Member Functions inherited from anthocnet::core::IKinematics | |
| virtual | ~IKinematics ()=default |
| virtual bool | self (Kinematics &out) const =0 |
Fill out and return true, or return false (leaving out untouched) when the position is unknown. | |
Static Public Member Functions | |
| static TypeId | GetTypeId () |
| ::anthocnet::core::NodeAddress | ToCore (Ipv4Address a) |
| static Ipv4Address | ToIpv4 (::anthocnet::core::NodeAddress a) |
Static Public Attributes | |
| static const uint16_t | ANT_PORT |
| UDP port for ant control traffic. | |
Protected Member Functions | |
| void | DoInitialize () override |
| void | DoDispose () override |
Definition at line 66 of file anthocnet-routing-protocol.h.
| typedef void(* ns3::anthocnet::RoutingProtocol::AntTxCallback) (uint8_t type, uint8_t direction, bool broadcast) |
Definition at line 80 of file anthocnet-routing-protocol.h.
| typedef void(* ns3::anthocnet::RoutingProtocol::AntRxCallback) (uint8_t type, uint8_t direction) |
Definition at line 81 of file anthocnet-routing-protocol.h.
| typedef void(* ns3::anthocnet::RoutingProtocol::RouteChangedCallback) (uint32_t dest, uint32_t neighbor, bool added) |
Definition at line 82 of file anthocnet-routing-protocol.h.
| typedef void(* ns3::anthocnet::RoutingProtocol::MacReinjectCallback) (const Ipv4Header &header, Ptr< const Packet > packet) |
Definition at line 89 of file anthocnet-routing-protocol.h.
| ns3::anthocnet::RoutingProtocol::RoutingProtocol | ( | ) |
|
override |
|
static |
|
override |
|
override |
|
override |
| void ns3::anthocnet::RoutingProtocol::GetPheromoneDiag | ( | Ipv4Address | dest, |
| Ipv4Address | neighbor, | ||
| double & | regular, | ||
| double & | virt | ||
| ) | const |
|
override |
|
override |
|
override |
| void ns3::anthocnet::RoutingProtocol::NotifyPhyRxSinr | ( | Ptr< const Packet > | packet, |
| double | sinrDb | ||
| ) |
Called by the PHY monitor hook for every received MPDU (#181).
|
overridevirtual |
Implements anthocnet::core::IEnergy.
|
inline |
Set the probe residualEnergyFraction() reads (#145).
Definition at line 130 of file anthocnet-routing-protocol.h.
|
override |
|
override |
|
override |
|
override |
|
override |
|
override |
|
override |
|
override |
|
override |
| int64_t ns3::anthocnet::RoutingProtocol::AssignStreams | ( | int64_t | stream | ) |
Seed the protocol's RNG; returns the number of streams used.
| int64_t ns3::anthocnet::RoutingProtocol::AssignTimerStreams | ( | int64_t | stream | ) |
#496: seed the hello/proactive timer-jitter stream (separate from the core's decision stream, so jitter draws never shift the core's sequence); returns the number of streams used.
AntHocNetHelper assigns these after every node's core stream, so the core streams keep their pre-#496 indices.
|
inline |
Issue #20 diagnostics: LinkFail origin/propagation split from the core (origins = antTx[linkfail] − propagations; budget drops = suppressed).
Definition at line 162 of file anthocnet-routing-protocol.h.
|
inline |
Definition at line 163 of file anthocnet-routing-protocol.h.
|
inline |
Definition at line 164 of file anthocnet-routing-protocol.h.
|
inline |
Directed reactive discovery diagnostics: reactive forward ants unicast along the diffusion gradient instead of broadcast (EnableDirectedReactive).
Zero on an enabled run means the gradient never covered a destination the regular table was missing, i.e. the switch was inert for this scenario.
Definition at line 172 of file anthocnet-routing-protocol.h.
|
inline |
Issue #133 observability: per-node pheromone-table size gauge from the core — current (neighbor, dest) entry counts, split regular vs virtual.
Read by the comparison harness under –diag to watch table growth.
Definition at line 177 of file anthocnet-routing-protocol.h.
|
inline |
Definition at line 180 of file anthocnet-routing-protocol.h.
|
inline |
#641 observability: the neighbour holding the most regular pheromone toward dest – the learn site's strongest-route rule – or 0.0.0.0 when there is none.
Read by the harnesses' –vizTrace; no routing decision uses it (data still samples next hops from pheromone^beta).
Definition at line 188 of file anthocnet-routing-protocol.h.
|
inline |
Issue #21 hold-time attribution: per-reason (setup / reconvergence / repair) pending-queue hold-time stats accumulated over the run, read by the comparison harness under –diag to locate the delay tail's dominant hold path.
Definition at line 208 of file anthocnet-routing-protocol.h.
|
inline |
Issue #215 drop-cause breakdown, the AntHocNet-specific causes.
The generic ones (channel, MAC, TTL, interface queue) are measured simulator-side by the comparison harness for every protocol; these three exist only here because only this protocol has a pending queue and a local-repair discard.
Data packets released by a failed local repair ([1] §3.5, D6) — the packet count behind the core's DiscardPending events. This is expected protocol behaviour, not a fault: the paper trades these packets for a bounded delay tail.
Definition at line 220 of file anthocnet-routing-protocol.h.
|
inline |
Expired local repairs (the core's event count; several packets may be released per event).
Definition at line 223 of file anthocnet-routing-protocol.h.
|
inline |
Data packets a MAC retry-limit drop put back into the pending queue (#46 re-injection).
Such a packet is not lost yet — its terminal fate is counted wherever it finally ends up — so the harness subtracts these from the raw MAC-failure tally to avoid double-counting them (#215).
Definition at line 228 of file anthocnet-routing-protocol.h.
|
overrideprotected |
|
overrideprotected |
|
inlinestatic |
Definition at line 241 of file anthocnet-routing-protocol.h.
Referenced by StrongestNextHop().
|
inlinestatic |
Definition at line 246 of file anthocnet-routing-protocol.h.
Referenced by StrongestNextHop().
|
static |
UDP port for ant control traffic.
Definition at line 74 of file anthocnet-routing-protocol.h.