dtn::ProphetNode Class Reference

#include <ProphetNode.h>

Inheritance diagram for dtn::ProphetNode:

oasys::Logger dtn::RIBNode

List of all members.


Detailed Description

ProphetNode stores state for a remote node as identified by remote_eid.

Definition at line 54 of file ProphetNode.h.


Public Member Functions

 ProphetNode (ProphetNodeParams *params=NULL, const char *logpath="/dtn/route/prophet/node")
 ProphetNode (const ProphetNode &node)
virtual ~ProphetNode ()
double p_value () const
bool relay () const
bool custody () const
bool internet_gw () const
EndpointID remote_eid () const
const oasys::Timeage () const
bool route_to_me (const EndpointID &eid) const
void set_eid (const EndpointID &eid)
void set_pvalue (double d)
void set_relay (bool relay)
void set_custody (bool custody)
void set_internet_gw (bool gw)
void set_age (oasys::Time t)
void set_age_now ()
ProphetNodeoperator= (const ProphetNode &p)
double encounter () const
double beta () const
double gamma () const
u_int age_factor () const
void update_pvalue ()
 We have just seen this node, update delivery predictability metric p.
void update_transitive (double ab, double bc)
 We have just seen a RIB containing this node, update transitivity p.
void update_age ()
 p.
bool set_encounter (double d)
bool set_beta (double d)
bool set_gamma (double d)
void set_age_factor (u_int ms_per_unit)
void dump (oasys::StringBuffer *buf)

Protected Member Functions

u_int time_to_units (oasys::Time diff)
 Use kappa_ milliseconds per unit to convert t (as a diff) to time units for use in Eq.

Protected Attributes

ProphetNodeParamsparams_
 initialization constants
double p_value_
 Delivery prediction for remote.
bool relay_
 Relay node.
bool custody_
 Custody node.
bool internet_gateway_
 Internet gateway node.
EndpointIDPattern remote_eid_
 implicit DTN route to remote
oasys::Time age_
 time of last write to pvalue

Constructor & Destructor Documentation

dtn::ProphetNode::ProphetNode ( ProphetNodeParams params = NULL,
const char *  logpath = "/dtn/route/prophet/node" 
)

Definition at line 23 of file ProphetNode.cc.

References age_, and oasys::Time::get_time().

dtn::ProphetNode::ProphetNode ( const ProphetNode node  ) 

Definition at line 34 of file ProphetNode.cc.

virtual dtn::ProphetNode::~ProphetNode (  )  [inline, virtual]

Definition at line 62 of file ProphetNode.h.


Member Function Documentation

double dtn::ProphetNode::p_value (  )  const [inline]

Definition at line 64 of file ProphetNode.h.

References p_value_.

Referenced by dtn::ProphetController::dump_state(), dtn::ProphetEncounter::handle_rib_tlv(), dtn::ProphetTable::p_value(), dtn::RIBTLV::serialize(), and dtn::ProphetTable::truncate().

bool dtn::ProphetNode::relay (  )  const [inline]

Definition at line 65 of file ProphetNode.h.

References relay_.

Referenced by dtn::ProphetController::dump_state(), dtn::ProphetEncounter::handle_rib_tlv(), and dtn::RIBTLV::serialize().

bool dtn::ProphetNode::custody (  )  const [inline]

Definition at line 66 of file ProphetNode.h.

References custody_.

Referenced by dtn::ProphetController::dump_state(), dtn::ProphetEncounter::handle_rib_tlv(), and dtn::RIBTLV::serialize().

bool dtn::ProphetNode::internet_gw (  )  const [inline]

Definition at line 67 of file ProphetNode.h.

References internet_gateway_.

Referenced by dtn::ProphetController::dump_state(), dtn::ProphetEncounter::handle_rib_tlv(), and dtn::RIBTLV::serialize().

EndpointID dtn::ProphetNode::remote_eid (  )  const [inline]

Definition at line 68 of file ProphetNode.h.

References remote_eid_.

Referenced by dtn::ProphetEncounter::send_dictionary(), and dtn::ProphetTable::update().

const oasys::Time& dtn::ProphetNode::age (  )  const [inline]

Definition at line 69 of file ProphetNode.h.

References age_.

bool dtn::ProphetNode::route_to_me ( const EndpointID eid  )  const

Definition at line 82 of file ProphetNode.cc.

References dtn::Prophet::eid_to_route(), dtn::EndpointIDPattern::match(), and remote_eid_.

void dtn::ProphetNode::set_eid ( const EndpointID eid  )  [inline]

Definition at line 72 of file ProphetNode.h.

References dtn::EndpointID::assign(), and remote_eid_.

Referenced by dtn::ProphetController::handle_bundle_received(), dtn::ProphetEncounter::handle_rib_tlv(), and dtn::ProphetEncounter::send_dictionary().

void dtn::ProphetNode::set_pvalue ( double  d  )  [inline]

Definition at line 73 of file ProphetNode.h.

References p_value_.

Referenced by dtn::RIBTLV::deserialize(), and dtn::ProphetEncounter::handle_rib_tlv().

void dtn::ProphetNode::set_relay ( bool  relay  )  [inline]

Definition at line 76 of file ProphetNode.h.

References relay_.

Referenced by dtn::RIBTLV::deserialize(), and dtn::ProphetEncounter::handle_rib_tlv().

void dtn::ProphetNode::set_custody ( bool  custody  )  [inline]

Definition at line 77 of file ProphetNode.h.

References custody_.

Referenced by dtn::RIBTLV::deserialize(), and dtn::ProphetEncounter::handle_rib_tlv().

void dtn::ProphetNode::set_internet_gw ( bool  gw  )  [inline]

Definition at line 78 of file ProphetNode.h.

References internet_gateway_.

Referenced by dtn::RIBTLV::deserialize(), and dtn::ProphetEncounter::handle_rib_tlv().

void dtn::ProphetNode::set_age ( oasys::Time  t  )  [inline]

Definition at line 79 of file ProphetNode.h.

References age_, oasys::Time::sec_, and oasys::Time::usec_.

void dtn::ProphetNode::set_age_now (  )  [inline]

Definition at line 80 of file ProphetNode.h.

References age_, and oasys::Time::get_time().

ProphetNode& dtn::ProphetNode::operator= ( const ProphetNode p  )  [inline]

Definition at line 82 of file ProphetNode.h.

References age_, dtn::EndpointID::assign(), custody_, internet_gateway_, p_value_, relay_, remote_eid_, oasys::Time::sec_, and oasys::Time::usec_.

Referenced by dtn::RIBNode::operator=().

double dtn::ProphetNode::encounter (  )  const [inline]

Definition at line 93 of file ProphetNode.h.

References dtn::ProphetNodeParams::encounter_, and params_.

double dtn::ProphetNode::beta (  )  const [inline]

Definition at line 94 of file ProphetNode.h.

References dtn::ProphetNodeParams::beta_, and params_.

double dtn::ProphetNode::gamma (  )  const [inline]

Definition at line 95 of file ProphetNode.h.

References dtn::ProphetNodeParams::gamma_, and params_.

u_int dtn::ProphetNode::age_factor (  )  const [inline]

Definition at line 96 of file ProphetNode.h.

References dtn::ProphetNodeParams::kappa_, and params_.

void dtn::ProphetNode::update_pvalue (  ) 

We have just seen this node, update delivery predictability metric p.

Equation 1, Section 2.1.1 P_(A,B) = P_(A,B)_old + ( 1 - P_(A,B)_old ) * P_encounter.

9, 2.1.1, equation 1

Definition at line 92 of file ProphetNode.cc.

References ASSERT, dtn::ProphetNodeParams::encounter_, log_debug, p_value_, and params_.

Referenced by dtn::ProphetEncounter::handle_rib_tlv().

void dtn::ProphetNode::update_transitive ( double  ab,
double  bc 
)

We have just seen a RIB containing this node, update transitivity p.

Equation 3, Section 2.1.1 P_(A,C) = P_(A,C)_old + ( 1 - P_(A,C)_old ) * P_(A,B) * P_(B,C) * beta.

10, 2.1.1, equation 3

Definition at line 110 of file ProphetNode.cc.

References ASSERT, dtn::ProphetNodeParams::beta_, log_debug, p_value_, and params_.

void dtn::ProphetNode::update_age (  ) 

p.

Equation 2, Section 2.1.1 P_(A,B) = P_(A,B)_old * gamma^K.

9, 2.1.1, equation 2

Definition at line 132 of file ProphetNode.cc.

References age_, ASSERT, dtn::ProphetNodeParams::gamma_, oasys::Time::get_time(), log_debug, p_value_, params_, and time_to_units().

bool dtn::ProphetNode::set_encounter ( double  d  )  [inline]

Definition at line 114 of file ProphetNode.h.

References dtn::ProphetNodeParams::encounter_, and params_.

bool dtn::ProphetNode::set_beta ( double  d  )  [inline]

Definition at line 118 of file ProphetNode.h.

References dtn::ProphetNodeParams::beta_, and params_.

bool dtn::ProphetNode::set_gamma ( double  d  )  [inline]

Definition at line 122 of file ProphetNode.h.

References dtn::ProphetNodeParams::gamma_, and params_.

void dtn::ProphetNode::set_age_factor ( u_int  ms_per_unit  )  [inline]

Definition at line 126 of file ProphetNode.h.

References dtn::ProphetNodeParams::kappa_, and params_.

void dtn::ProphetNode::dump ( oasys::StringBuffer buf  ) 

Reimplemented in dtn::RIBNode.

Definition at line 51 of file ProphetNode.cc.

References oasys::StringBuffer::appendf(), dtn::EndpointID::c_str(), custody_, internet_gateway_, p_value_, relay_, and remote_eid_.

u_int dtn::ProphetNode::time_to_units ( oasys::Time  diff  )  [protected]

Use kappa_ milliseconds per unit to convert t (as a diff) to time units for use in Eq.

2

Definition at line 157 of file ProphetNode.cc.

References dtn::ProphetNodeParams::kappa_, log_debug, params_, oasys::Time::sec_, and oasys::Time::usec_.

Referenced by update_age().


Member Data Documentation

ProphetNodeParams* dtn::ProphetNode::params_ [protected]

initialization constants

Definition at line 139 of file ProphetNode.h.

Referenced by age_factor(), beta(), encounter(), gamma(), set_age_factor(), set_beta(), set_encounter(), set_gamma(), time_to_units(), update_age(), update_pvalue(), and update_transitive().

double dtn::ProphetNode::p_value_ [protected]

Delivery prediction for remote.

Definition at line 140 of file ProphetNode.h.

Referenced by dump(), operator=(), p_value(), set_pvalue(), update_age(), update_pvalue(), and update_transitive().

bool dtn::ProphetNode::relay_ [protected]

Relay node.

Definition at line 141 of file ProphetNode.h.

Referenced by dump(), operator=(), relay(), and set_relay().

bool dtn::ProphetNode::custody_ [protected]

Custody node.

Definition at line 142 of file ProphetNode.h.

Referenced by custody(), dump(), operator=(), and set_custody().

bool dtn::ProphetNode::internet_gateway_ [protected]

Internet gateway node.

Definition at line 143 of file ProphetNode.h.

Referenced by dump(), internet_gw(), operator=(), and set_internet_gw().

EndpointIDPattern dtn::ProphetNode::remote_eid_ [protected]

implicit DTN route to remote

Definition at line 144 of file ProphetNode.h.

Referenced by dump(), operator=(), remote_eid(), route_to_me(), and set_eid().

oasys::Time dtn::ProphetNode::age_ [protected]

time of last write to pvalue

Definition at line 145 of file ProphetNode.h.

Referenced by age(), operator=(), ProphetNode(), set_age(), set_age_now(), and update_age().


The documentation for this class was generated from the following files:
Generated on Sat Sep 8 08:43:48 2007 for DTN Reference Implementation by  doxygen 1.5.3