NS-3 based Named Data Networking (NDN) simulator
ndnSIM: NDN, CCN, CCNx, content centric networks
API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
ns3::ndn::fib::FaceMetric Class Reference

Structure holding various parameters associated with a (FibEntry, Face) tuple. More...

#include <ndn-fib-entry.h>

Public Types

enum  Status { NDN_FIB_GREEN = 1, NDN_FIB_YELLOW = 2, NDN_FIB_RED = 3 }
 Color codes for FIB face status.
 

Public Member Functions

 FaceMetric (Ptr< Face > face, int32_t cost)
 Metric constructor. More...
 
bool operator< (const FaceMetric &fm) const
 Comparison operator used by boost::multi_index::identity<>
 
bool operator< (const Ptr< Face > &face) const
 Comparison between FaceMetric and Face.
 
Ptr< FaceGetFace () const
 Return Face associated with FaceMetric.
 
void UpdateRtt (const Time &rttSample)
 Recalculate smoothed RTT and RTT variation. More...
 
Status GetStatus () const
 Get current status of FIB entry.
 
void SetStatus (Status status)
 Set current status of FIB entry.
 
int32_t GetRoutingCost () const
 Get current routing cost.
 
void SetRoutingCost (int32_t routingCost)
 Set routing cost.
 
Time GetSRtt () const
 Get current estimate for smoothed RTT value.
 
Time GetRttVar () const
 Get current estimate for the RTT variation.
 
Time GetRealDelay () const
 Get real propagation delay to the producer, calculated based on NS-3 p2p link delays.
 
void SetRealDelay (Time realDelay)
 Set real propagation delay to the producer, calculated based on NS-3 p2p link delays.
 
TracedValue< Status > & GetStatusTrace ()
 Get direct access to status trace.
 

Friends

std::ostream & operator<< (std::ostream &os, const FaceMetric &metric)
 

Detailed Description

Structure holding various parameters associated with a (FibEntry, Face) tuple.

Definition at line 58 of file ndn-fib-entry.h.

Constructor & Destructor Documentation

ns3::ndn::fib::FaceMetric::FaceMetric ( Ptr< Face face,
int32_t  cost 
)
inline

Metric constructor.

Parameters
faceFace for which metric
costInitial value for routing cost

Definition at line 74 of file ndn-fib-entry.h.

Member Function Documentation

void ns3::ndn::fib::FaceMetric::UpdateRtt ( const Time &  rttSample)

Recalculate smoothed RTT and RTT variation.

Parameters
rttSampleRTT sample

Definition at line 55 of file ndn-fib-entry.cc.

Referenced by ns3::ndn::fib::Entry::UpdateFaceRtt().


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