97 m_code = readNonNegativeIntegerAs<uint32_t>(*val);
Represents a TLV element of the NDN packet format.
element_const_iterator elements_begin() const noexcept
Equivalent to elements().begin().
element_const_iterator elements_end() const noexcept
Equivalent to elements().end().
bool hasWire() const noexcept
Check if the Block contains a fully encoded wire representation.
void push_back(const Block &element)
Append a sub-element.
void encode()
Encode sub-elements into TLV-VALUE.
uint32_t type() const noexcept
Return the TLV-TYPE of the Block.
void reset() noexcept
Reset the Block to a default-constructed state.
void parse() const
Parse TLV-VALUE into sub-elements.
void wireDecode(const Block &block)
const Block & wireEncode() const
ControlResponse & setBody(const Block &body)
ControlResponse & setText(const std::string &text)
ControlResponse & setCode(uint32_t code)
Block makeStringBlock(uint32_t type, std::string_view value)
Create a TLV block containing a string.
Block makeNonNegativeIntegerBlock(uint32_t type, uint64_t value)
Create a TLV block containing a non-negative integer.
std::string readString(const Block &block)
Read the TLV-VALUE of a TLV element as a string.