NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: NDN, CCN, CCNx, content centric networks
API Documentation
nfd::ndnlp::PartialMessage Class Reference

represents a partially received message More...

#include <ndnlp-partial-message-store.hpp>

Collaboration diagram for nfd::ndnlp::PartialMessage:

Public Member Functions

 PartialMessage ()
 
 PartialMessage (const PartialMessage &)=delete
 
PartialMessageoperator= (const PartialMessage &)=delete
 
 PartialMessage (PartialMessage &&)=default
 
PartialMessageoperator= (PartialMessage &&)=default
 
bool add (uint16_t fragIndex, uint16_t fragCount, const Block &payload)
 
bool isComplete () const
 
std::tuple< bool, Blockreassemble ()
 reassemble network layer packet More...
 

Static Public Member Functions

static std::tuple< bool, BlockreassembleSingle (const NdnlpData &fragment)
 reassemble network layer packet from a single fragment More...
 

Public Attributes

scheduler::ScopedEventId expiry
 

Detailed Description

represents a partially received message

Definition at line 37 of file ndnlp-partial-message-store.hpp.

Constructor & Destructor Documentation

◆ PartialMessage() [1/3]

nfd::ndnlp::PartialMessage::PartialMessage ( )

Definition at line 34 of file ndnlp-partial-message-store.cpp.

◆ PartialMessage() [2/3]

nfd::ndnlp::PartialMessage::PartialMessage ( const PartialMessage )
delete

◆ PartialMessage() [3/3]

nfd::ndnlp::PartialMessage::PartialMessage ( PartialMessage &&  )
default

Member Function Documentation

◆ operator=() [1/2]

PartialMessage& nfd::ndnlp::PartialMessage::operator= ( const PartialMessage )
delete

◆ operator=() [2/2]

PartialMessage& nfd::ndnlp::PartialMessage::operator= ( PartialMessage &&  )
default

◆ add()

bool nfd::ndnlp::PartialMessage::add ( uint16_t  fragIndex,
uint16_t  fragCount,
const Block payload 
)

◆ isComplete()

bool nfd::ndnlp::PartialMessage::isComplete ( ) const

◆ reassemble()

std::tuple< bool, Block > nfd::ndnlp::PartialMessage::reassemble ( )

reassemble network layer packet

Precondition
isComplete() == true
Returns
whether success, network layer packet

Definition at line 70 of file ndnlp-partial-message-store.cpp.

References ndn::Block::fromBuffer(), and isComplete().

Referenced by nfd::ndnlp::PartialMessageStore::receive().

◆ reassembleSingle()

std::tuple< bool, Block > nfd::ndnlp::PartialMessage::reassembleSingle ( const NdnlpData fragment)
static

reassemble network layer packet from a single fragment

Precondition
fragment.fragCount == 1
Returns
whether success, network layer packet

Definition at line 85 of file ndnlp-partial-message-store.cpp.

References ndn::Block::blockFromValue(), nfd::ndnlp::NdnlpData::fragCount, and nfd::ndnlp::NdnlpData::payload.

Referenced by nfd::ndnlp::PartialMessageStore::receive().

Member Data Documentation

◆ expiry

scheduler::ScopedEventId nfd::ndnlp::PartialMessage::expiry

Definition at line 73 of file ndnlp-partial-message-store.hpp.


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