nlsr::LsaContentPublisher Class Reference
Inheritance diagram for nlsr::LsaContentPublisher:
[legend]
Collaboration diagram for nlsr::LsaContentPublisher:
[legend]

Public Member Functions

 LsaContentPublisher (ndn::Face &face, ndn::KeyChain &keyChain, const ndn::security::SigningInfo &signingInfo, const ndn::time::milliseconds &freshnessPeriod, const std::string &content)
 
virtual size_t generate (ndn::EncodingBuffer &outBuffer)
 In a derived class, write the octets into outBuffer. More...
 
void publish (const ndn::Name &prefix)
 Publish data under the provided prefix. More...
 

Static Public Member Functions

static size_t getMaxSegmentSize ()
 Define the max segment size as half the max NDN packet size. More...
 
static constexpr ndn::time::milliseconds getDefaultFreshness ()
 

Detailed Description

Definition at line 36 of file lsdb.cpp.

Constructor & Destructor Documentation

nlsr::LsaContentPublisher::LsaContentPublisher ( ndn::Face &  face,
ndn::KeyChain &  keyChain,
const ndn::security::SigningInfo &  signingInfo,
const ndn::time::milliseconds &  freshnessPeriod,
const std::string &  content 
)
inline

Definition at line 39 of file lsdb.cpp.

Member Function Documentation

virtual size_t nlsr::LsaContentPublisher::generate ( ndn::EncodingBuffer &  outBuffer)
inlinevirtual

In a derived class, write the octets into outBuffer.

Implements nlsr::SegmentPublisher< ndn::Face >.

Definition at line 50 of file lsdb.cpp.

static constexpr ndn::time::milliseconds nlsr::SegmentPublisher< ndn::Face >::getDefaultFreshness ( )
inlinestaticinherited

Definition at line 67 of file segment-publisher.hpp.

static size_t nlsr::SegmentPublisher< ndn::Face >::getMaxSegmentSize ( )
inlinestaticinherited

Define the max segment size as half the max NDN packet size.

Definition at line 60 of file segment-publisher.hpp.

void nlsr::SegmentPublisher< ndn::Face >::publish ( const ndn::Name &  prefix)
inlineinherited

Publish data under the provided prefix.

Processes whatever is provided from SegmentPublisher::generate, by breaking it into segments of MAX_SEGMENT_SIZE and sending each one individually. The last segment is distinguished by having the final block ID set to a timestamp.

Definition at line 80 of file segment-publisher.hpp.