36 template<encoding::Tag TAG>
40 size_t totalLength = 0;
48 totalLength += encoder.prependVarNumber(totalLength);
67 m_wire = buffer.block();
126 m_capacity = capacity;
150 m_nEntries = nEntries;
184 return os <<
"CsInfo: "
186 << (csi.
getEnableAdmit() ?
"admit enabled, " :
"admit disabled, ")
187 << (csi.
getEnableServe() ?
"serve enabled, " :
"serve disabled, ")
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.
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.
Represents the CS Information dataset.
CsInfo & setEnableServe(bool enableServe)
CsInfo & setNEntries(uint64_t nEntries)
CsInfo & setEnableAdmit(bool enableAdmit)
uint64_t getCapacity() const
Get CS capacity (in number of packets).
CsInfo & setNMisses(uint64_t nMisses)
void wireDecode(const Block &wire)
const Block & wireEncode() const
bool getEnableAdmit() const
Get CS_ENABLE_ADMIT flag.
uint64_t getNEntries() const
Get number of stored CS entries.
CsInfo & setCapacity(uint64_t capacity)
uint64_t getNHits() const
Get number of CS lookup hits since NFD started.
CsInfo & setNHits(uint64_t nHits)
bool getEnableServe() const
Get CS_ENABLE_SERVE flag.
uint64_t getNMisses() const
Get number of CS lookup misses since NFD started.
#define NDN_CXX_DEFINE_WIRE_ENCODE_INSTANTIATIONS(ClassName)
@ BIT_CS_ENABLE_ADMIT
enables the CS to admit new Data
@ BIT_CS_ENABLE_SERVE
enables the CS to satisfy Interests using cached Data
EncodingImpl< EstimatorTag > EncodingEstimator
uint64_t readNonNegativeInteger(const Block &block)
Read a non-negative integer from a TLV element.
size_t prependNonNegativeIntegerBlock(EncodingImpl< TAG > &encoder, uint32_t type, uint64_t value)
Prepend a TLV element containing a non-negative integer.
EncodingImpl< EncoderTag > EncodingBuffer
Contains classes and functions related to the NFD Management protocol.
std::ostream & operator<<(std::ostream &os, FaceScope faceScope)
bool operator==(const ChannelStatus &a, const ChannelStatus &b)