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

Namespaces

namespace  codec
 
namespace  metrics
 

Classes

class  AntHistoryTracker
 
struct  AntHop
 One entry on an ant's visited-node stack: a node and the trip time the ant took to reach it from the previous hop. More...
 
struct  AntMessage
 Complete, copyable description of an ant packet. More...
 
class  AntRouterLogic
 
struct  ClassicMetric
 The canonical AntHocNet metric (Eq.2): blend the path-time estimate with the hop-count estimate and invert. More...
 
struct  Config
 
class  GenerationTracker
 Multipath acceptance filter for reactive forward ants ([1] §3.1, issue #96). More...
 
struct  HelloDest
 A (destination, pheromone) advert carried by a hello ant for building the virtual pheromone table. More...
 
class  IClock
 Source of simulation time (seconds). More...
 
struct  ILinkMetric
 Maps an observation to a pheromone (goodness; higher == better). More...
 
class  ILinkState
 Node-local MAC-layer signals for the congestion-aware per-hop metric (item 10/A2, [1] §3.2). More...
 
class  INeighborProvider
 Current set of one-hop neighbours, as seen by the link layer. More...
 
class  IRng
 Source of randomness. More...
 
class  IRouterObserver
 Optional observer the core notifies of routing events (item 15). More...
 
class  ITimerScheduler
 Deferred-execution port for periodic ant generation / table maintenance. More...
 
struct  LinkObservation
 What a backward ant knows about the path from this node to the destination. More...
 
class  PheromoneEngine
 
class  PheromoneTable
 
struct  RouteDecision
 
class  ShortestPathGraph
 

Typedefs

using NodeAddress = std::int32_t
 Network-layer node address.
 
using Time = double
 Simulation time, in seconds.
 
using VisitedPath = std::vector< AntHop >
 

Enumerations

enum class  AntType : std::uint8_t {
  Hello = 0x01 , Reactive = 0x02 , Proactive = 0x04 , Repair = 0x08 ,
  LinkFail = 0x10
}
 Ant role. More...
 
enum class  AntDirection : std::uint8_t { Up = 0x11 , Down = 0x12 }
 Travel direction. More...
 
enum class  RouteAction {
  None , Unicast , Broadcast , Queue ,
  Deliver , Drop , DiscardPending
}
 

Variables

constexpr NodeAddress kInvalidAddress = -1
 "No such node / no route" sentinel, mirroring the legacy use of -1.
 

Typedef Documentation

◆ NodeAddress

using anthocnet::core::NodeAddress = typedef std::int32_t

Network-layer node address.

Matches the width of ns-2's nsaddr_t and ns-3's 32-bit IPv4 address payload.

Definition at line 21 of file types.h.

◆ Time

using anthocnet::core::Time = typedef double

Simulation time, in seconds.

Definition at line 24 of file types.h.

◆ VisitedPath

using anthocnet::core::VisitedPath = typedef std::vector<AntHop>

Definition at line 30 of file visited_path.h.

Enumeration Type Documentation

◆ AntType

enum class anthocnet::core::AntType : std::uint8_t
strong

Ant role.

Values match the legacy ANTTYPE* bit flags so existing traces remain comparable.

Enumerator
Hello 
Reactive 
Proactive 
Repair 
LinkFail 

link-failure notification (payload in helloDests).

Definition at line 25 of file ant_message.h.

◆ AntDirection

enum class anthocnet::core::AntDirection : std::uint8_t
strong

Travel direction.

Up = forward (toward destination), Down = backward (retracing the path to reinforce it).

Enumerator
Up 
Down 

Definition at line 35 of file ant_message.h.

◆ RouteAction

enum class anthocnet::core::RouteAction
strong
Enumerator
None 

Nothing to do.

Unicast 

Send message to nextHop.

Broadcast 

Link-layer broadcast message.

Queue 

Hold the data packet pending a route to nextHop/dst.

Deliver 

Destination reached: hand to the local transport.

Drop 

Discard (loop, TTL, no route).

DiscardPending 

Local repair timed out ([1] §3.5, D6): discard the data packets queued for destination nextHop.

Definition at line 21 of file route_decision.h.

Variable Documentation

◆ kInvalidAddress

constexpr NodeAddress anthocnet::core::kInvalidAddress = -1
constexpr

"No such node / no route" sentinel, mirroring the legacy use of -1.

Definition at line 27 of file types.h.

Referenced by anthocnet::core::RouteDecision::deliver(), anthocnet::core::RouteDecision::drop(), and anthocnet::core::RouteDecision::none().