esp8266ndn
NDN Arduino library for ESP8266 and more
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Public Attributes | List of all members
ndnph::Decoder::Tlv Class Reference

Decoded TLV. More...

#include <decoder.hpp>

Public Member Functions

 operator bool () const
 Whether this TLV is valid (e.g. not dereferenced from past-end Iterator). More...
 
template<typename T >
bool decode (T &target) const
 Decode into target object. More...
 
Decoder vd () const
 Create Decoder over TLV-VALUE. More...
 

Public Attributes

uint32_t type = 0
 
size_t length = 0
 
const uint8_t * value = nullptr
 
const uint8_t * tlv = nullptr
 
size_t size = 0
 

Detailed Description

Decoded TLV.

Member Function Documentation

◆ decode()

template<typename T >
bool ndnph::Decoder::Tlv::decode ( T &  target) const
inline

Decode into target object.

Template Parameters
Tclass with `bool decodeFrom(const Decoder::Tlv&)` method.
Returns
whether success.
Precondition
target is newly constructed.
Postcondition
target may contain reference to the decoder's underlying input buffer.

◆ operator bool()

ndnph::Decoder::Tlv::operator bool ( ) const
inlineexplicit

Whether this TLV is valid (e.g. not dereferenced from past-end Iterator).

◆ vd()

Decoder ndnph::Decoder::Tlv::vd ( ) const
inline

Create Decoder over TLV-VALUE.

Member Data Documentation

◆ length

size_t ndnph::Decoder::Tlv::length = 0

◆ size

size_t ndnph::Decoder::Tlv::size = 0

◆ tlv

const uint8_t* ndnph::Decoder::Tlv::tlv = nullptr

◆ type

uint32_t ndnph::Decoder::Tlv::type = 0

◆ value

const uint8_t* ndnph::Decoder::Tlv::value = nullptr

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