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::ContentStore Class Referenceabstract

Base class for NDN content store. More...

#include <ndn-content-store.h>

Inheritance diagram for ns3::ndn::ContentStore:
Collaboration diagram for ns3::ndn::ContentStore:

Public Member Functions

virtual ~ContentStore ()
 Virtual destructor.
 
virtual Ptr< DataLookup (Ptr< const Interest > interest)=0
 Find corresponding CS entry for the given interest. More...
 
virtual bool Add (Ptr< const Data > data)=0
 Add a new content to the content store. More...
 
virtual void Print (std::ostream &os) const =0
 Print out content store entries.
 
virtual uint32_t GetSize () const =0
 Get number of entries in content store.
 
virtual Ptr< cs::EntryBegin ()=0
 Return first element of content store (no order guaranteed)
 
virtual Ptr< cs::EntryEnd ()=0
 Return item next after last (no order guaranteed)
 
virtual Ptr< cs::EntryNext (Ptr< cs::Entry >)=0
 Advance the iterator.
 

Static Public Member Functions

static TypeId GetTypeId ()
 Interface ID. More...
 
static Ptr< ContentStoreGetContentStore (Ptr< Object > node)
 Static call to cheat python bindings.
 

Protected Attributes

TracedCallback< Ptr< const
Interest >, Ptr< const Data > > 
m_cacheHitsTrace
 trace of cache hits
 
TracedCallback< Ptr< const
Interest > > 
m_cacheMissesTrace
 trace of cache misses
 

Detailed Description

Base class for NDN content store.

Particular implementations should implement Lookup, Add, and Print methods

Doxygen introspection did not find any typical Config paths.
No Attributes are defined for this type.

TraceSources

  • CacheHits: Trace called every time there is a cache hit
  • CacheMisses: Trace called every time there is a cache miss

Definition at line 105 of file ndn-content-store.h.

Member Function Documentation

virtual bool ns3::ndn::ContentStore::Add ( Ptr< const Data data)
pure virtual

Add a new content to the content store.

Parameters
headerFully parsed Data
packetFully formed Ndn packet to add to content store (will be copied and stripped down of headers)
Returns
true if an existing entry was updated, false otherwise

Implemented in ns3::ndn::cs::ContentStoreImpl< Policy >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< lru_policy_traits, ndnSIM::freshness_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< Policy, ndnSIM::lifetime_stats_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< fifo_policy_traits >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< ndnSIM::probability_policy_traits, fifo_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< lru_policy_traits, ndnSIM::lifetime_stats_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< Policy, ndnSIM::freshness_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< lfu_policy_traits, ndnSIM::lifetime_stats_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< fifo_policy_traits, ndnSIM::freshness_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< fifo_policy_traits, ndnSIM::lifetime_stats_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< lfu_policy_traits >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< random_policy_traits, ndnSIM::freshness_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< random_policy_traits, ndnSIM::lifetime_stats_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< ndnSIM::probability_policy_traits, random_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< ndnSIM::probability_policy_traits, lfu_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< random_policy_traits >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< lfu_policy_traits, ndnSIM::freshness_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< lru_policy_traits >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< ndnSIM::probability_policy_traits, Policy > > >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< ndnSIM::probability_policy_traits, lru_policy_traits > > >, ns3::ndn::cs::Nocache, ns3::ndn::cs::ContentStoreWithFreshness< Policy >, ns3::ndn::cs::ContentStoreWithFreshness< fifo_policy_traits >, ns3::ndn::cs::ContentStoreWithFreshness< lfu_policy_traits >, ns3::ndn::cs::ContentStoreWithFreshness< random_policy_traits >, and ns3::ndn::cs::ContentStoreWithFreshness< lru_policy_traits >.

TypeId ns3::ndn::ContentStore::GetTypeId ( void  )
static

Interface ID.

Returns
interface ID

Definition at line 38 of file ndn-content-store.cc.

References m_cacheHitsTrace, and m_cacheMissesTrace.

virtual Ptr<Data> ns3::ndn::ContentStore::Lookup ( Ptr< const Interest interest)
pure virtual

Find corresponding CS entry for the given interest.

Parameters
interestInterest for which matching content store entry will be searched

If an entry is found, it is promoted to the top of most recent used entries index,

See also
m_contentStore

Implemented in ns3::ndn::cs::ContentStoreImpl< Policy >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< lru_policy_traits, ndnSIM::freshness_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< Policy, ndnSIM::lifetime_stats_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< fifo_policy_traits >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< ndnSIM::probability_policy_traits, fifo_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< lru_policy_traits, ndnSIM::lifetime_stats_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< Policy, ndnSIM::freshness_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< lfu_policy_traits, ndnSIM::lifetime_stats_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< fifo_policy_traits, ndnSIM::freshness_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< fifo_policy_traits, ndnSIM::lifetime_stats_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< lfu_policy_traits >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< random_policy_traits, ndnSIM::freshness_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< random_policy_traits, ndnSIM::lifetime_stats_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< ndnSIM::probability_policy_traits, random_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< ndnSIM::probability_policy_traits, lfu_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< random_policy_traits >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< lfu_policy_traits, ndnSIM::freshness_policy_traits > > >, ns3::ndn::cs::ContentStoreImpl< lru_policy_traits >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< ndnSIM::probability_policy_traits, Policy > > >, ns3::ndn::cs::ContentStoreImpl< ndnSIM::multi_policy_traits< boost::mpl::vector2< ndnSIM::probability_policy_traits, lru_policy_traits > > >, and ns3::ndn::cs::Nocache.


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