represents the CS Information dataset More...
#include <cs-info.hpp>
Classes | |
class | Error |
Public Member Functions | |
CsInfo () | |
CsInfo (const Block &block) | |
template<encoding::Tag TAG> | |
size_t | wireEncode (EncodingImpl< TAG > &encoder) const |
const Block & | wireEncode () const |
void | wireDecode (const Block &wire) |
uint64_t | getCapacity () const |
get CS capacity (in number of packets) More... | |
CsInfo & | setCapacity (uint64_t capacity) |
bool | getEnableAdmit () const |
get CS_ENABLE_ADMIT flag More... | |
CsInfo & | setEnableAdmit (bool enableAdmit) |
bool | getEnableServe () const |
get CS_ENABLE_SERVE flag More... | |
CsInfo & | setEnableServe (bool enableServe) |
uint64_t | getNEntries () const |
get number of stored CS entries More... | |
CsInfo & | setNEntries (uint64_t nEntries) |
uint64_t | getNHits () const |
get number of CS lookup hits since NFD starts More... | |
CsInfo & | setNHits (uint64_t nHits) |
uint64_t | getNMisses () const |
get number of CS lookup misses since NFD starts More... | |
CsInfo & | setNMisses (uint64_t nMisses) |
represents the CS Information dataset
Definition at line 37 of file cs-info.hpp.
ndn::nfd::CsInfo::CsInfo | ( | ) |
Definition at line 33 of file cs-info.cpp.
|
explicit |
Definition at line 41 of file cs-info.cpp.
References wireDecode().
size_t ndn::nfd::CsInfo::wireEncode | ( | EncodingImpl< TAG > & | encoder | ) | const |
Definition at line 48 of file cs-info.cpp.
References ndn::tlv::nfd::Capacity, ndn::tlv::nfd::CsInfo, ndn::tlv::nfd::Flags, ndn::tlv::nfd::NCsEntries, ndn::nfd::NDN_CXX_DEFINE_WIRE_ENCODE_INSTANTIATIONS(), ndn::tlv::nfd::NHits, ndn::tlv::nfd::NMisses, and ndn::encoding::prependNonNegativeIntegerBlock().
Referenced by nfd::CsManager::CsManager().
const Block & ndn::nfd::CsInfo::wireEncode | ( | ) | const |
Definition at line 66 of file cs-info.cpp.
References ndn::Block::hasWire().
void ndn::nfd::CsInfo::wireDecode | ( | const Block & | wire | ) |
Definition at line 82 of file cs-info.cpp.
References ndn::tlv::nfd::Capacity, ndn::tlv::nfd::CsInfo, ndn::Block::elements_begin(), ndn::Block::elements_end(), ndn::tlv::nfd::Flags, ndn::tlv::nfd::NCsEntries, NDN_THROW, ndn::tlv::nfd::NHits, ndn::tlv::nfd::NMisses, ndn::Block::parse(), ndn::encoding::readNonNegativeInteger(), and ndn::Block::type().
Referenced by CsInfo().
|
inline |
get CS capacity (in number of packets)
Definition at line 64 of file cs-info.hpp.
References setCapacity().
Referenced by ndn::nfd::operator<<(), and ndn::nfd::operator==().
CsInfo & ndn::nfd::CsInfo::setCapacity | ( | uint64_t | capacity | ) |
Definition at line 133 of file cs-info.cpp.
References ndn::Block::reset().
Referenced by nfd::CsManager::CsManager(), and getCapacity().
|
inline |
get CS_ENABLE_ADMIT flag
Definition at line 75 of file cs-info.hpp.
References ndn::nfd::BIT_CS_ENABLE_ADMIT, and setEnableAdmit().
Referenced by ndn::nfd::operator<<(), and ndn::nfd::operator==().
CsInfo & ndn::nfd::CsInfo::setEnableAdmit | ( | bool | enableAdmit | ) |
Definition at line 141 of file cs-info.cpp.
References ndn::nfd::BIT_CS_ENABLE_ADMIT, and ndn::Block::reset().
Referenced by nfd::CsManager::CsManager(), and getEnableAdmit().
|
inline |
get CS_ENABLE_SERVE flag
Definition at line 86 of file cs-info.hpp.
References ndn::nfd::BIT_CS_ENABLE_SERVE, and setEnableServe().
Referenced by ndn::nfd::operator<<(), and ndn::nfd::operator==().
CsInfo & ndn::nfd::CsInfo::setEnableServe | ( | bool | enableServe | ) |
Definition at line 149 of file cs-info.cpp.
References ndn::nfd::BIT_CS_ENABLE_SERVE, and ndn::Block::reset().
Referenced by nfd::CsManager::CsManager(), and getEnableServe().
|
inline |
get number of stored CS entries
Definition at line 97 of file cs-info.hpp.
References setNEntries().
Referenced by ndn::nfd::operator<<(), and ndn::nfd::operator==().
CsInfo & ndn::nfd::CsInfo::setNEntries | ( | uint64_t | nEntries | ) |
Definition at line 157 of file cs-info.cpp.
References ndn::Block::reset().
Referenced by nfd::CsManager::CsManager(), and getNEntries().
|
inline |
get number of CS lookup hits since NFD starts
Definition at line 108 of file cs-info.hpp.
References setNHits().
Referenced by ndn::nfd::operator<<(), and ndn::nfd::operator==().
CsInfo & ndn::nfd::CsInfo::setNHits | ( | uint64_t | nHits | ) |
Definition at line 165 of file cs-info.cpp.
References ndn::Block::reset().
Referenced by nfd::CsManager::CsManager(), and getNHits().
|
inline |
get number of CS lookup misses since NFD starts
Definition at line 119 of file cs-info.hpp.
References ndn::nfd::NDN_CXX_DECLARE_WIRE_ENCODE_INSTANTIATIONS(), ndn::nfd::operator==(), and setNMisses().
Referenced by ndn::nfd::operator<<(), and ndn::nfd::operator==().
CsInfo & ndn::nfd::CsInfo::setNMisses | ( | uint64_t | nMisses | ) |
Definition at line 173 of file cs-info.cpp.
References ndn::Block::reset().
Referenced by nfd::CsManager::CsManager(), and getNMisses().