ndn-embeds 0.1.0
Lightweight NDN protocol stack for embedded systems
Loading...
Searching...
No Matches
ndn::CsEntry Class Reference

Content Store entry. More...

#include <ndn/cs.hpp>

Public Member Functions

const Datadata () const
 Get the cached Data.
 
TimeMs staleTime () const
 Get the freshness expiration timestamp.
 
bool isFresh (TimeMs now) const
 Check if the Data is fresh.
 

Friends

class ContentStore
 

Detailed Description

Content Store entry.

Holds a single cached Data packet and its metadata.

Definition at line 33 of file cs.hpp.

Member Function Documentation

◆ data()

const Data & ndn::CsEntry::data ( ) const
inline

Get the cached Data.

Returns
Const reference to the Data

Definition at line 39 of file cs.hpp.

◆ isFresh()

bool ndn::CsEntry::isFresh ( TimeMs  now) const

Check if the Data is fresh.

Parameters
nowCurrent time (milliseconds)
Returns
true if fresh

Definition at line 15 of file cs.cpp.

◆ staleTime()

TimeMs ndn::CsEntry::staleTime ( ) const
inline

Get the freshness expiration timestamp.

After this time, the Data is considered "stale".

Returns
Freshness expiration (milliseconds), 0 means no expiration

Definition at line 48 of file cs.hpp.

Friends And Related Symbol Documentation

◆ ContentStore

friend class ContentStore
friend

Definition at line 59 of file cs.hpp.


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