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

Optional observer the core notifies of routing events (item 15). More...

#include <anthocnet/core/ports.h>

Inheritance diagram for anthocnet::core::IRouterObserver:
ahn_web::Node ns3::anthocnet::RoutingProtocol

Public Member Functions

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).
 

Detailed Description

Optional observer the core notifies of routing events (item 15).

It only reports — it never makes routing decisions or does I/O, so the core stays pure. Adapters implement it to fan events out to their native trace machinery (ns-3 TracedCallback, ns-2 trace lines). All methods default to no-ops; when no observer is set the core pays only a null-pointer check.

Definition at line 90 of file ports.h.

Constructor & Destructor Documentation

◆ ~IRouterObserver()

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

Member Function Documentation

◆ onAntSent()

virtual void anthocnet::core::IRouterObserver::onAntSent ( AntType  ,
AntDirection  ,
bool   
)
inlinevirtual

This node put an ant on the medium (origination or forwarding).

Definition at line 94 of file ports.h.

◆ onAntReceived()

virtual void anthocnet::core::IRouterObserver::onAntReceived ( AntType  ,
AntDirection   
)
inlinevirtual

This node processed a (non-duplicate) received ant.

Definition at line 96 of file ports.h.

◆ onRouteChanged()

virtual void anthocnet::core::IRouterObserver::onRouteChanged ( NodeAddress  ,
NodeAddress  ,
bool   
)
inlinevirtual

A neighbour/route entry was added (true) or removed (false).

Definition at line 98 of file ports.h.


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