NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: NDN, CCN, CCNx, content centric networks
API Documentation
ndn::encoding::EncodingImpl< EncoderTag > Class Template Reference

EncodingImpl specialization for actual TLV encoding. More...

#include <encoding-buffer.hpp>

Inheritance diagram for ndn::encoding::EncodingImpl< EncoderTag >:
Collaboration diagram for ndn::encoding::EncodingImpl< EncoderTag >:

Public Member Functions

 EncodingImpl (size_t totalReserve=MAX_NDN_PACKET_SIZE, size_t reserveFromBack=400)
 
 EncodingImpl (const Block &block)
 
- Public Member Functions inherited from ndn::encoding::Encoder
size_t prependBytes (span< const uint8_t > bytes)
 Prepend a sequence of bytes. More...
 
size_t appendBytes (span< const uint8_t > bytes)
 Append a sequence of bytes. More...
 
template<class Iterator >
size_t prependRange (Iterator first, Iterator last)
 Prepend range of bytes from the range [first, last) More...
 
template<class Iterator >
size_t appendRange (Iterator first, Iterator last)
 Append range of bytes from the range [first, last) More...
 
size_t prependVarNumber (uint64_t number)
 Prepend number encoded as a VAR-NUMBER in NDN-TLV format. More...
 
size_t appendVarNumber (uint64_t number)
 Append number encoded as a VAR-NUMBER in NDN-TLV format. More...
 
size_t prependNonNegativeInteger (uint64_t integer)
 Prepend integer encoded as a NonNegativeInteger in NDN-TLV format. More...
 
size_t appendNonNegativeInteger (uint64_t integer)
 Append integer encoded as a NonNegativeInteger in NDN-TLV format. More...
 
 Encoder (size_t totalReserve=MAX_NDN_PACKET_SIZE, size_t reserveFromBack=400)
 Create instance of the encoder with the specified reserved sizes. More...
 
 Encoder (const Block &block)
 Create EncodingBlock from existing block. More...
 
void reserve (size_t size, bool addInFront)
 Reserve size bytes for the underlying buffer. More...
 
void reserveBack (size_t size)
 Reserve at least size bytes at the back of the underlying buffer. More...
 
void reserveFront (size_t size)
 Reserve at least isze bytes at the beginning of the underlying buffer. More...
 
size_t capacity () const noexcept
 Get size of the underlying buffer. More...
 
shared_ptr< BuffergetBuffer () const noexcept
 Get underlying buffer. More...
 
iterator begin () noexcept
 Returns an iterator pointing to the first byte of the encoded buffer. More...
 
const_iterator begin () const noexcept
 Returns an iterator pointing to the first byte of the encoded buffer. More...
 
iterator end () noexcept
 Returns an iterator pointing to the past-the-end byte of the encoded buffer. More...
 
const_iterator end () const noexcept
 Returns an iterator pointing to the past-the-end byte of the encoded buffer. More...
 
uint8_t * data () noexcept
 Returns a pointer to the first byte of the encoded buffer. More...
 
const uint8_t * data () const noexcept
 Returns a pointer to the first byte of the encoded buffer. More...
 
size_t size () const noexcept
 Returns the size of the encoded buffer. More...
 
Block block (bool verifyLength=true) const
 Create Block from the underlying buffer. More...
 

Additional Inherited Members

- Public Types inherited from ndn::encoding::Encoder
using value_type = Buffer::value_type
 
using iterator = Buffer::iterator
 
using const_iterator = Buffer::const_iterator
 

Detailed Description

template<>
class ndn::encoding::EncodingImpl< EncoderTag >

EncodingImpl specialization for actual TLV encoding.

Definition at line 36 of file encoding-buffer.hpp.

Constructor & Destructor Documentation

◆ EncodingImpl() [1/2]

ndn::encoding::EncodingImpl< EncoderTag >::EncodingImpl ( size_t  totalReserve = MAX_NDN_PACKET_SIZE,
size_t  reserveFromBack = 400 
)
inlineexplicit

Definition at line 40 of file encoding-buffer.hpp.

◆ EncodingImpl() [2/2]

ndn::encoding::EncodingImpl< EncoderTag >::EncodingImpl ( const Block block)
inlineexplicit

Definition at line 46 of file encoding-buffer.hpp.


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