NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.0: NDN, CCN, CCNx, content centric networks
API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
nfd::cs::Entry Class Reference

represents a base class for CS entry More...

#include <cs-entry.hpp>

Inheritance diagram for nfd::cs::Entry:
Collaboration diagram for nfd::cs::Entry:

Public Member Functions

 Entry ()
 
const Name & getName () const
 returns the name of the Data packet stored in the CS entry More...
 
const Name & getFullName () const
 returns the full name (including implicit digest) of the Data packet stored in the CS entry More...
 
bool isUnsolicited () const
 Data packet is unsolicited if this particular NDN node did not receive an Interest packet for it, or the Interest packet has already expired. More...
 
const Data & getData () const
 returns the Data packet stored in the CS entry More...
 
void setData (const Data &data, bool isUnsolicited)
 changes the content of CS entry and recomputes digest More...
 
const
time::steady_clock::TimePoint & 
getStaleTime () const
 returns the absolute time when Data becomes expired More...
 
void updateStaleTime ()
 refreshes the time when Data becomes expired according to the current absolute time. More...
 
bool isStale () const
 checks if the stored Data is stale More...
 
void reset ()
 clears CS entry After reset, *this == Entry() More...
 

Detailed Description

represents a base class for CS entry

Definition at line 42 of file cs-entry.hpp.

Constructor & Destructor Documentation

nfd::cs::Entry::Entry ( )

Definition at line 38 of file cs-entry.cpp.

Member Function Documentation

const Data & nfd::cs::Entry::getData ( ) const
inline

returns the Data packet stored in the CS entry

Definition at line 122 of file cs-entry.hpp.

const Name & nfd::cs::Entry::getFullName ( ) const
inline

returns the full name (including implicit digest) of the Data packet stored in the CS entry

Returns
{ NDN name }

Definition at line 115 of file cs-entry.hpp.

Referenced by nfd::Cs::erase().

const Name & nfd::cs::Entry::getName ( ) const
inline

returns the name of the Data packet stored in the CS entry

Returns
{ NDN name }

Definition at line 108 of file cs-entry.hpp.

const time::steady_clock::TimePoint & nfd::cs::Entry::getStaleTime ( ) const
inline

returns the absolute time when Data becomes expired

Returns
{ Time (resolution up to time::milliseconds) }

Definition at line 135 of file cs-entry.hpp.

Referenced by nfd::StalenessComparator::operator()().

bool nfd::cs::Entry::isStale ( ) const

checks if the stored Data is stale

Definition at line 59 of file cs-entry.cpp.

bool nfd::cs::Entry::isUnsolicited ( ) const
inline

Data packet is unsolicited if this particular NDN node did not receive an Interest packet for it, or the Interest packet has already expired.

Returns
{ True if the Data packet is unsolicited; otherwise False }

Definition at line 129 of file cs-entry.hpp.

Referenced by nfd::UnsolicitedComparator::operator()(), and setData().

void nfd::cs::Entry::reset ( )

clears CS entry After reset, *this == Entry()

Definition at line 65 of file cs-entry.cpp.

Referenced by nfd::cs::skip_list::Entry::release().

void nfd::cs::Entry::setData ( const Data &  data,
bool  isUnsolicited 
)

changes the content of CS entry and recomputes digest

Definition at line 44 of file cs-entry.cpp.

References isUnsolicited(), and updateStaleTime().

void nfd::cs::Entry::updateStaleTime ( )

refreshes the time when Data becomes expired according to the current absolute time.

Definition at line 53 of file cs-entry.cpp.

Referenced by setData().


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