represents a route in a RibEntry More...
#include <rib-entry.hpp>
Classes | |
class | Error |
Public Member Functions | |
Route () | |
Route (const Block &block) | |
uint64_t | getFaceId () const |
Route & | setFaceId (uint64_t faceId) |
RouteOrigin | getOrigin () const |
Route & | setOrigin (RouteOrigin origin) |
uint64_t | getCost () const |
Route & | setCost (uint64_t cost) |
uint64_t | getFlags () const |
Route & | setFlags (uint64_t flags) |
bool | hasExpirationPeriod () const |
time::milliseconds | getExpirationPeriod () const |
Route & | setExpirationPeriod (time::milliseconds expirationPeriod) |
Route & | unsetExpirationPeriod () |
template<encoding::Tag TAG> | |
size_t | wireEncode (EncodingImpl< TAG > &block) const |
const Block & | wireEncode () const |
void | wireDecode (const Block &block) |
Public Member Functions inherited from ndn::nfd::RouteFlagsTraits< Route > | |
bool | isChildInherit () const |
bool | isRibCapture () const |
Additional Inherited Members | |
Protected Member Functions inherited from ndn::nfd::RouteFlagsTraits< Route > | |
RouteFlagsTraits ()=default | |
represents a route in a RibEntry
A route indicates the availability of content via a certain face and provides meta-information about the face.
Definition at line 42 of file rib-entry.hpp.
ndn::nfd::Route::Route | ( | ) |
Definition at line 38 of file rib-entry.cpp.
|
explicit |
Definition at line 46 of file rib-entry.cpp.
References wireDecode().
|
inline |
Definition at line 57 of file rib-entry.hpp.
References setFaceId().
Referenced by ndn::nfd::operator<<(), and ndn::nfd::operator==().
Route & ndn::nfd::Route::setFaceId | ( | uint64_t | faceId | ) |
Definition at line 52 of file rib-entry.cpp.
References ndn::Block::reset().
Referenced by nfd::RibManager::enableLocalFields(), and getFaceId().
|
inline |
Definition at line 66 of file rib-entry.hpp.
References setOrigin().
Referenced by ndn::nfd::operator<<(), and ndn::nfd::operator==().
Route & ndn::nfd::Route::setOrigin | ( | RouteOrigin | origin | ) |
Definition at line 60 of file rib-entry.cpp.
References ndn::Block::reset().
Referenced by nfd::RibManager::enableLocalFields(), and getOrigin().
|
inline |
Definition at line 75 of file rib-entry.hpp.
References setCost().
Referenced by ndn::nfd::operator<<(), and ndn::nfd::operator==().
Route & ndn::nfd::Route::setCost | ( | uint64_t | cost | ) |
Definition at line 68 of file rib-entry.cpp.
References ndn::Block::reset().
Referenced by nfd::RibManager::enableLocalFields(), and getCost().
|
inline |
Definition at line 84 of file rib-entry.hpp.
References setFlags().
Referenced by ndn::nfd::operator<<(), and ndn::nfd::operator==().
Route & ndn::nfd::Route::setFlags | ( | uint64_t | flags | ) |
Definition at line 76 of file rib-entry.cpp.
References ndn::Block::reset().
Referenced by nfd::RibManager::enableLocalFields(), and getFlags().
|
inline |
Definition at line 93 of file rib-entry.hpp.
Referenced by ndn::nfd::operator<<().
|
inline |
Definition at line 99 of file rib-entry.hpp.
References ndn::nfd::NDN_CXX_DECLARE_WIRE_ENCODE_INSTANTIATIONS(), ndn::nfd::operator==(), setExpirationPeriod(), unsetExpirationPeriod(), wireDecode(), and wireEncode().
Referenced by ndn::nfd::operator<<(), and ndn::nfd::operator==().
Route & ndn::nfd::Route::setExpirationPeriod | ( | time::milliseconds | expirationPeriod | ) |
Definition at line 84 of file rib-entry.cpp.
References ndn::Block::reset(), and unsetExpirationPeriod().
Referenced by nfd::RibManager::enableLocalFields(), and getExpirationPeriod().
Route & ndn::nfd::Route::unsetExpirationPeriod | ( | ) |
Definition at line 95 of file rib-entry.cpp.
References nonstd::optional_lite::nullopt, and ndn::Block::reset().
Referenced by getExpirationPeriod(), and setExpirationPeriod().
size_t ndn::nfd::Route::wireEncode | ( | EncodingImpl< TAG > & | block | ) | const |
Definition at line 104 of file rib-entry.cpp.
References ndn::tlv::nfd::Cost, ndn::tlv::nfd::ExpirationPeriod, ndn::tlv::nfd::FaceId, ndn::tlv::nfd::Flags, ndn::nfd::NDN_CXX_DEFINE_WIRE_ENCODE_INSTANTIATIONS(), ndn::tlv::nfd::Origin, ndn::encoding::prependNonNegativeIntegerBlock(), and ndn::tlv::nfd::Route.
const Block & ndn::nfd::Route::wireEncode | ( | ) | const |
Definition at line 125 of file rib-entry.cpp.
References ndn::Block::hasWire().
Referenced by getExpirationPeriod(), ndn::nfd::RibEntry::setRoutes(), and ndn::nfd::RibEntry::wireEncode().
void ndn::nfd::Route::wireDecode | ( | const Block & | block | ) |
Definition at line 141 of file rib-entry.cpp.
References ndn::tlv::nfd::Cost, ndn::Block::elements_begin(), ndn::Block::elements_end(), ndn::tlv::nfd::ExpirationPeriod, ndn::tlv::nfd::FaceId, ndn::tlv::nfd::Flags, NDN_THROW, nonstd::optional_lite::nullopt, ndn::tlv::nfd::Origin, ndn::Block::parse(), ndn::encoding::readNonNegativeInteger(), ndn::tlv::nfd::Route, and ndn::Block::type().
Referenced by getExpirationPeriod(), ndn::nfd::RibEntry::RibEntry(), Route(), and ndn::nfd::RibEntry::setRoutes().