11#ifndef ANTHOCNET_CORE_PORTS_H
12#define ANTHOCNET_CORE_PORTS_H
46 virtual std::vector<NodeAddress>
neighbors()
const = 0;
53 virtual void schedule(
Time delay, std::function<
void()> callback) = 0;
Source of simulation time (seconds).
virtual Time now() const =0
virtual ~IClock()=default
Node-local MAC-layer signals for the congestion-aware per-hop metric (item 10/A2, [1] §3....
virtual ~ILinkState()=default
virtual Time macServiceTime(NodeAddress nextHop) const =0
Smoothed per-packet MAC service time (seconds) toward nextHop: a running average of the time from a p...
virtual int macQueueLength(NodeAddress nextHop) const =0
Packets currently queued for transmission toward nextHop (those a newly-enqueued packet would wait be...
Current set of one-hop neighbours, as seen by the link layer.
virtual ~INeighborProvider()=default
virtual std::vector< NodeAddress > neighbors() const =0
virtual int uniformInt(int n)=0
Uniform integer in [0, n). Caller guarantees n > 0.
virtual double uniform()=0
Uniform double in [0, 1).
Optional observer the core notifies of routing events (item 15).
virtual ~IRouterObserver()=default
virtual void onAntReceived(AntType, AntDirection)
This node processed a (non-duplicate) received ant.
virtual void onAntSent(AntType, AntDirection, bool)
This node put an ant on the medium (origination or forwarding).
virtual void onRouteChanged(NodeAddress, NodeAddress, bool)
A neighbour/route entry was added (true) or removed (false).
Deferred-execution port for periodic ant generation / table maintenance.
virtual ~ITimerScheduler()=default
virtual void schedule(Time delay, std::function< void()> callback)=0
double Time
Simulation time, in seconds.
std::int32_t NodeAddress
Network-layer node address.
AntDirection
Travel direction.
AntHistoryTracker: (src, seqNum) duplicate detection.