NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.0: 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

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

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

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

Member Function Documentation

PartialMessage& nfd::ndnlp::PartialMessage::operator= ( const PartialMessage )
delete
PartialMessage& nfd::ndnlp::PartialMessage::operator= ( PartialMessage &&  )
default
bool nfd::ndnlp::PartialMessage::add ( uint16_t  fragIndex,
uint16_t  fragCount,
const Block payload 
)
bool nfd::ndnlp::PartialMessage::isComplete ( ) const
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().

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

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

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