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

PIT entry. More...

#include <ndn/pit.hpp>

Public Member Functions

const Namename () const
 Get the Interest Name.
 
uint32_t nonce () const
 Get the Interest nonce.
 
TimeMs expireTime () const
 Get the entry expiration time.
 
Face management
size_t faceCount () const
 Get the number of registered Faces.
 
FaceId face (size_t index) const
 Get the Face ID at a given index.
 
bool hasFace (FaceId faceId) const
 Check if a given Face is registered.
 
bool addFace (FaceId faceId)
 Add a Face.
 

Friends

class Pit
 

Detailed Description

PIT entry.

Holds information about a single pending Interest. When the same Interest is received from multiple Faces, their Face IDs are recorded.

Definition at line 46 of file pit.hpp.

Member Function Documentation

◆ addFace()

bool ndn::PitEntry::addFace ( FaceId  faceId)

Add a Face.

Parameters
faceIdFace ID to add
Returns
true on success, false if already registered or full

Definition at line 25 of file pit.cpp.

References hasFace(), and ndn::PIT_MAX_FACES_PER_ENTRY.

Referenced by ndn::Pit::insert().

◆ expireTime()

TimeMs ndn::PitEntry::expireTime ( ) const
inline

Get the entry expiration time.

Returns
Expiration timestamp (milliseconds)

Definition at line 64 of file pit.hpp.

◆ face()

FaceId ndn::PitEntry::face ( size_t  index) const

Get the Face ID at a given index.

Parameters
indexIndex (starting from 0)
Returns
FaceId

Definition at line 9 of file pit.cpp.

References ndn::FACE_ID_INVALID.

◆ faceCount()

size_t ndn::PitEntry::faceCount ( ) const
inline

Get the number of registered Faces.

Returns
Number of Faces

Definition at line 74 of file pit.hpp.

Referenced by ndn::Forwarder::putData().

◆ hasFace()

bool ndn::PitEntry::hasFace ( FaceId  faceId) const

Check if a given Face is registered.

Parameters
faceIdFace ID to check
Returns
true if registered

Definition at line 16 of file pit.cpp.

Referenced by addFace().

◆ name()

const Name & ndn::PitEntry::name ( ) const
inline

Get the Interest Name.

Returns
Const reference to the Name

Definition at line 52 of file pit.hpp.

Referenced by ndn::Forwarder::processEvents().

◆ nonce()

uint32_t ndn::PitEntry::nonce ( ) const
inline

Get the Interest nonce.

Returns
Nonce value

Definition at line 58 of file pit.hpp.

Friends And Related Symbol Documentation

◆ Pit

friend class Pit
friend

Definition at line 99 of file pit.hpp.


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