prophet::Decider Class Reference

Base class for FwdStrategy deciders, used by router to decide whether to forward a Bundle based on the forwarding strategy. More...

#include <Decider.h>

Inheritance diagram for prophet::Decider:
prophet::FwdDeciderGRTR prophet::FwdDeciderGRTRPLUS prophet::FwdDeciderGTMX prophet::FwdDeciderGTMXPLUS

List of all members.

Public Member Functions

virtual ~Decider ()
 Destructor.
virtual bool operator() (const Bundle *) const =0
 The decision function: return true if the strategy says to forward the Bundle; else false.

FwdStrategy::fwd_strategy_t fwd_strategy () const
 Accessors.
const Linknexthop () const
 Accessors.
const BundleCorecore () const
 Accessors.
const Tablelocal_nodes () const
 Accessors.
const Tableremote_nodes () const
 Accessors.
const Statsstats () const
 Accessors.
bool is_relay () const
 Accessors.

Static Public Member Functions

static Deciderdecider (FwdStrategy::fwd_strategy_t fs, const Link *nexthop, BundleCore *core, const Table *local_nodes, const Table *remote_nodes, const Stats *stats=NULL, u_int max_forward=0, bool is_relay=true)
 Factory method for creating decider instance.

Protected Member Functions

 Decider (FwdStrategy::fwd_strategy_t fs, const Link *nexthop, BundleCore *core, const Table *local, const Table *remote, const Stats *stats, bool is_relay)
 Constructor.

Protected Attributes

FwdStrategy::fwd_strategy_t fwd_strategy_
 which strategy is in use
const Linknext_hop_
 next hop Link
BundleCore *const core_
 facade interface to Bundle host
const Tablelocal_
 local routing table
const Tableremote_
 peer's routing table
const Statsstats_
 forwarding statistics per Bundle
bool is_relay_
 whether peer acts as a relay (forwards Bundles)

Detailed Description

Base class for FwdStrategy deciders, used by router to decide whether to forward a Bundle based on the forwarding strategy.

Definition at line 33 of file Decider.h.


Constructor & Destructor Documentation

virtual prophet::Decider::~Decider (  )  [inline, virtual]

Destructor.

Definition at line 39 of file Decider.h.

prophet::Decider::Decider ( FwdStrategy::fwd_strategy_t  fs,
const Link nexthop,
BundleCore core,
const Table local,
const Table remote,
const Stats stats,
bool  is_relay 
) [inline, protected]

Constructor.

Definition at line 73 of file Decider.h.


Member Function Documentation

const BundleCore* prophet::Decider::core (  )  const [inline]

Accessors.

Definition at line 62 of file Decider.h.

References core_.

Decider * prophet::Decider::decider ( FwdStrategy::fwd_strategy_t  fs,
const Link nexthop,
BundleCore core,
const Table local_nodes,
const Table remote_nodes,
const Stats stats = NULL,
u_int  max_forward = 0,
bool  is_relay = true 
) [inline, static]
FwdStrategy::fwd_strategy_t prophet::Decider::fwd_strategy (  )  const [inline]

Accessors.

Definition at line 60 of file Decider.h.

References fwd_strategy_.

bool prophet::Decider::is_relay (  )  const [inline]

Accessors.

Definition at line 66 of file Decider.h.

References is_relay_.

const Table* prophet::Decider::local_nodes (  )  const [inline]

Accessors.

Definition at line 63 of file Decider.h.

References local_.

const Link* prophet::Decider::nexthop (  )  const [inline]

Accessors.

Definition at line 61 of file Decider.h.

References next_hop_.

virtual bool prophet::Decider::operator() ( const Bundle  )  const [pure virtual]

The decision function: return true if the strategy says to forward the Bundle; else false.

Implemented in prophet::FwdDeciderGRTR, prophet::FwdDeciderGTMX, prophet::FwdDeciderGRTRPLUS, and prophet::FwdDeciderGTMXPLUS.

const Table* prophet::Decider::remote_nodes (  )  const [inline]

Accessors.

Definition at line 64 of file Decider.h.

References remote_.

const Stats* prophet::Decider::stats (  )  const [inline]

Accessors.

Definition at line 65 of file Decider.h.

References stats_.


Member Data Documentation

BundleCore* const prophet::Decider::core_ [protected]

which strategy is in use

Definition at line 83 of file Decider.h.

Referenced by fwd_strategy().

const Table* prophet::Decider::local_ [protected]

local routing table

Definition at line 86 of file Decider.h.

Referenced by local_nodes(), and prophet::FwdDeciderGRTR::operator()().

const Link* prophet::Decider::next_hop_ [protected]
const Table* prophet::Decider::remote_ [protected]
const Stats* prophet::Decider::stats_ [protected]

forwarding statistics per Bundle

Definition at line 88 of file Decider.h.

Referenced by prophet::FwdDeciderGTMXPLUS::operator()(), prophet::FwdDeciderGRTRPLUS::operator()(), and stats().


The documentation for this class was generated from the following file:
Generated on Sun Nov 21 13:21:30 2010 for DTN Reference Implementation by  doxygen 1.6.3