ndn::lp::NackHeader Class Reference

Represents a Network Nack header. More...

#include <ndn-cxx/lp/nack-header.hpp>

Public Member Functions

 NackHeader ()
 
 NackHeader (const Block &block)
 
NackReason getReason () const
 Get reason code. More...
 
NackHeadersetReason (NackReason reason)
 Set reason code. More...
 
void wireDecode (const Block &wire)
 
const BlockwireEncode () const
 
template<encoding::Tag TAG>
size_t wireEncode (EncodingImpl< TAG > &encoder) const
 

Detailed Description

Represents a Network Nack header.

Definition at line 57 of file nack-header.hpp.

Constructor & Destructor Documentation

◆ NackHeader() [1/2]

ndn::lp::NackHeader::NackHeader ( )

Definition at line 56 of file nack-header.cpp.

◆ NackHeader() [2/2]

ndn::lp::NackHeader::NackHeader ( const Block block)
explicit

Definition at line 61 of file nack-header.cpp.

Member Function Documentation

◆ getReason()

NackReason ndn::lp::NackHeader::getReason ( ) const

Get reason code.

Return values
NackReason::NONEif NackReason element does not exist or has an unknown code

Definition at line 120 of file nack-header.cpp.

◆ setReason()

NackHeader & ndn::lp::NackHeader::setReason ( NackReason  reason)

Set reason code.

Parameters
reasona reason code; NackReason::NONE clears the reason

Definition at line 133 of file nack-header.cpp.

◆ wireDecode()

void ndn::lp::NackHeader::wireDecode ( const Block wire)

Definition at line 98 of file nack-header.cpp.

◆ wireEncode() [1/2]

const Block & ndn::lp::NackHeader::wireEncode ( ) const

Definition at line 80 of file nack-header.cpp.

◆ wireEncode() [2/2]

template<encoding::Tag TAG>
size_t ndn::lp::NackHeader::wireEncode ( EncodingImpl< TAG > &  encoder) const

Definition at line 68 of file nack-header.cpp.