represents parameters in a ControlCommand request or response More...
#include <control-parameters.hpp>
Classes | |
class | Error |
Public Member Functions | |
ControlParameters () | |
ControlParameters (const Block &block) | |
template<encoding::Tag TAG> | |
size_t | wireEncode (EncodingImpl< TAG > &encoder) const |
Block | wireEncode () const final |
void | wireDecode (const Block &wire) final |
bool | hasName () const |
const Name & | getName () const |
ControlParameters & | setName (const Name &name) |
ControlParameters & | unsetName () |
bool | hasFaceId () const |
uint64_t | getFaceId () const |
ControlParameters & | setFaceId (uint64_t faceId) |
ControlParameters & | unsetFaceId () |
bool | hasUri () const |
const std::string & | getUri () const |
ControlParameters & | setUri (const std::string &uri) |
ControlParameters & | unsetUri () |
bool | hasLocalUri () const |
const std::string & | getLocalUri () const |
ControlParameters & | setLocalUri (const std::string &localUri) |
ControlParameters & | unsetLocalUri () |
bool | hasOrigin () const |
RouteOrigin | getOrigin () const |
ControlParameters & | setOrigin (RouteOrigin origin) |
ControlParameters & | unsetOrigin () |
bool | hasCost () const |
uint64_t | getCost () const |
ControlParameters & | setCost (uint64_t cost) |
ControlParameters & | unsetCost () |
bool | hasFlags () const |
uint64_t | getFlags () const |
ControlParameters & | setFlags (uint64_t flags) |
ControlParameters & | unsetFlags () |
bool | hasMask () const |
uint64_t | getMask () const |
ControlParameters & | setMask (uint64_t mask) |
ControlParameters & | unsetMask () |
bool | hasStrategy () const |
const Name & | getStrategy () const |
ControlParameters & | setStrategy (const Name &strategy) |
ControlParameters & | unsetStrategy () |
bool | hasExpirationPeriod () const |
const time::milliseconds & | getExpirationPeriod () const |
ControlParameters & | setExpirationPeriod (const time::milliseconds &expirationPeriod) |
ControlParameters & | unsetExpirationPeriod () |
bool | hasFacePersistency () const |
FacePersistency | getFacePersistency () const |
ControlParameters & | setFacePersistency (FacePersistency persistency) |
ControlParameters & | unsetFacePersistency () |
const std::vector< bool > & | getPresentFields () const |
bool | hasFlagBit (size_t bit) const |
bool | getFlagBit (size_t bit) const |
ControlParameters & | setFlagBit (size_t bit, bool value, bool wantMask=true) |
set a bit in Flags More... | |
ControlParameters & | unsetFlagBit (size_t bit) |
disable a bit in Mask More... | |
Public Member Functions inherited from ndn::mgmt::ControlParameters | |
virtual | ~ControlParameters ()=default |
represents parameters in a ControlCommand request or response
This type is copyable because it's an abstraction of a TLV type.
Definition at line 71 of file control-parameters.hpp.
ndn::nfd::ControlParameters::ControlParameters | ( | ) |
Definition at line 37 of file control-parameters.cpp.
Referenced by ndn::nfd::ControlParameters::Error::Error().
|
explicit |
Definition at line 42 of file control-parameters.cpp.
References wireDecode().
size_t ndn::nfd::ControlParameters::wireEncode | ( | EncodingImpl< TAG > & | encoder | ) | const |
Definition at line 50 of file control-parameters.cpp.
References ndn::tlv::nfd::ControlParameters, ndn::tlv::nfd::Cost, ndn::tlv::nfd::ExpirationPeriod, ndn::tlv::nfd::FaceId, ndn::tlv::nfd::FacePersistency, ndn::tlv::nfd::Flags, hasCost(), hasExpirationPeriod(), hasFaceId(), hasFacePersistency(), hasFlags(), hasLocalUri(), hasMask(), hasName(), hasOrigin(), hasStrategy(), hasUri(), ndn::tlv::nfd::LocalUri, ndn::tlv::nfd::Mask, ndn::nfd::NDN_CXX_DEFINE_WIRE_ENCODE_INSTANTIATIONS(), ndn::tlv::nfd::Origin, ndn::encoding::prependNestedBlock(), ndn::encoding::prependNonNegativeIntegerBlock(), ndn::encoding::prependStringBlock(), ndn::tlv::nfd::Strategy, ndn::tlv::nfd::Uri, and ndn::Name::wireEncode().
Referenced by nfd::FibManager::FibManager(), ndn::nfd::ControlCommand::getRequestName(), nfd::rib::RibManager::onRibUpdateFailure(), nfd::FaceManager::setConfigFile(), and nfd::StrategyChoiceManager::StrategyChoiceManager().
|
finalvirtual |
Implements ndn::mgmt::ControlParameters.
Definition at line 98 of file control-parameters.cpp.
References ndn::Block::hasWire().
Referenced by ndn::nfd::ControlParameters::Error::Error().
|
finalvirtual |
Implements ndn::mgmt::ControlParameters.
Definition at line 114 of file control-parameters.cpp.
References ndn::nfd::CONTROL_PARAMETER_COST, ndn::nfd::CONTROL_PARAMETER_EXPIRATION_PERIOD, ndn::nfd::CONTROL_PARAMETER_FACE_ID, ndn::nfd::CONTROL_PARAMETER_FACE_PERSISTENCY, ndn::nfd::CONTROL_PARAMETER_FLAGS, ndn::nfd::CONTROL_PARAMETER_LOCAL_URI, ndn::nfd::CONTROL_PARAMETER_MASK, ndn::nfd::CONTROL_PARAMETER_NAME, ndn::nfd::CONTROL_PARAMETER_ORIGIN, ndn::nfd::CONTROL_PARAMETER_STRATEGY, ndn::nfd::CONTROL_PARAMETER_URI, ndn::tlv::nfd::ControlParameters, ndn::tlv::nfd::Cost, ndn::Block::elements_end(), ndn::tlv::nfd::ExpirationPeriod, ndn::tlv::nfd::FaceId, ndn::tlv::nfd::FacePersistency, ndn::Block::find(), ndn::tlv::nfd::Flags, hasCost(), hasExpirationPeriod(), hasFaceId(), hasFacePersistency(), hasFlags(), hasLocalUri(), hasMask(), hasName(), hasOrigin(), hasStrategy(), hasUri(), ndn::tlv::nfd::LocalUri, ndn::tlv::nfd::Mask, websocketpp::lib::asio::milliseconds(), ndn::tlv::Name, ndn::tlv::nfd::Origin, ndn::Block::parse(), ndn::encoding::readNonNegativeInteger(), ndn::encoding::readString(), ndn::tlv::nfd::Strategy, ndn::Block::type(), ndn::tlv::nfd::Uri, and ndn::Name::wireDecode().
Referenced by ndn::nfd::Controller::Controller(), ControlParameters(), and ndn::nfd::ControlParameters::Error::Error().
|
inline |
Definition at line 101 of file control-parameters.hpp.
References ndn::nfd::CONTROL_PARAMETER_NAME.
Referenced by getName(), ndn::nfd::operator<<(), wireDecode(), and wireEncode().
|
inline |
Definition at line 107 of file control-parameters.hpp.
References hasName().
Referenced by nfd::rib::AutoPrefixPropagator::disable(), nfd::FibManager::FibManager(), nfd::rib::RibManager::onRibUpdateFailure(), ndn::nfd::operator<<(), nfd::StrategyChoiceManager::StrategyChoiceManager(), and ndn::nfd::StrategyChoiceUnsetCommand::validateRequest().
|
inline |
Definition at line 114 of file control-parameters.hpp.
References ndn::nfd::CONTROL_PARAMETER_NAME.
Referenced by face::Face::Impl::asyncUnregisterPrefix(), nfd::rib::AutoPrefixPropagator::disable(), and face::Face::Impl::registerPrefix().
|
inline |
Definition at line 123 of file control-parameters.hpp.
References ndn::nfd::CONTROL_PARAMETER_NAME.
|
inline |
Definition at line 131 of file control-parameters.hpp.
References ndn::nfd::CONTROL_PARAMETER_FACE_ID.
Referenced by ndn::nfd::FaceUpdateCommand::applyDefaultsToRequest(), ndn::nfd::FibAddNextHopCommand::applyDefaultsToRequest(), ndn::nfd::FibRemoveNextHopCommand::applyDefaultsToRequest(), ndn::nfd::RibRegisterCommand::applyDefaultsToRequest(), ndn::nfd::RibUnregisterCommand::applyDefaultsToRequest(), getFaceId(), ndn::nfd::operator<<(), wireDecode(), and wireEncode().
|
inline |
Definition at line 137 of file control-parameters.hpp.
References hasFaceId().
Referenced by nfd::FibManager::FibManager(), nfd::rib::RibManager::onRibUpdateFailure(), ndn::nfd::operator<<(), nfd::FaceManager::setConfigFile(), ndn::nfd::FaceDestroyCommand::validateRequest(), ndn::nfd::FaceCreateCommand::validateResponse(), ndn::nfd::FaceUpdateCommand::validateResponse(), ndn::nfd::FibAddNextHopCommand::validateResponse(), ndn::nfd::FibRemoveNextHopCommand::validateResponse(), ndn::nfd::RibRegisterCommand::validateResponse(), and ndn::nfd::RibUnregisterCommand::validateResponse().
|
inline |
Definition at line 144 of file control-parameters.hpp.
References ndn::nfd::CONTROL_PARAMETER_FACE_ID.
Referenced by ndn::nfd::FaceUpdateCommand::applyDefaultsToRequest(), ndn::nfd::FibAddNextHopCommand::applyDefaultsToRequest(), ndn::nfd::FibRemoveNextHopCommand::applyDefaultsToRequest(), ndn::nfd::RibRegisterCommand::applyDefaultsToRequest(), ndn::nfd::RibUnregisterCommand::applyDefaultsToRequest(), ndn::util::DummyClientFace::DummyClientFace(), nfd::FibManager::FibManager(), nfd::rib::AutoPrefixPropagator::loadConfig(), nfd::rib::RibManager::onRibUpdateFailure(), and nfd::FaceManager::setConfigFile().
|
inline |
Definition at line 153 of file control-parameters.hpp.
References ndn::nfd::CONTROL_PARAMETER_FACE_ID.
|
inline |
Definition at line 161 of file control-parameters.hpp.
References ndn::nfd::CONTROL_PARAMETER_URI.
Referenced by getUri(), ndn::nfd::operator<<(), wireDecode(), and wireEncode().
|
inline |
Definition at line 167 of file control-parameters.hpp.
References hasUri().
Referenced by ndn::nfd::operator<<(), and nfd::FaceManager::setConfigFile().
|
inline |
Definition at line 174 of file control-parameters.hpp.
References ndn::nfd::CONTROL_PARAMETER_URI.
Referenced by nfd::FaceManager::setConfigFile().
|
inline |
Definition at line 183 of file control-parameters.hpp.
References ndn::nfd::CONTROL_PARAMETER_URI.
|
inline |
Definition at line 191 of file control-parameters.hpp.
References ndn::nfd::CONTROL_PARAMETER_LOCAL_URI.
Referenced by getLocalUri(), ndn::nfd::operator<<(), nfd::FaceManager::setConfigFile(), wireDecode(), and wireEncode().
|
inline |
Definition at line 197 of file control-parameters.hpp.
References hasLocalUri().
Referenced by ndn::nfd::operator<<(), and nfd::FaceManager::setConfigFile().
|
inline |
Definition at line 204 of file control-parameters.hpp.
References ndn::nfd::CONTROL_PARAMETER_LOCAL_URI.
|
inline |
Definition at line 213 of file control-parameters.hpp.
References ndn::nfd::CONTROL_PARAMETER_LOCAL_URI.
|
inline |
Definition at line 221 of file control-parameters.hpp.
References ndn::nfd::CONTROL_PARAMETER_ORIGIN.
Referenced by ndn::nfd::RibRegisterCommand::applyDefaultsToRequest(), ndn::nfd::RibUnregisterCommand::applyDefaultsToRequest(), getOrigin(), ndn::nfd::operator<<(), wireDecode(), and wireEncode().
|
inline |
Definition at line 227 of file control-parameters.hpp.
References hasOrigin().
Referenced by nfd::rib::RibManager::onRibUpdateFailure(), and ndn::nfd::operator<<().
|
inline |
Definition at line 234 of file control-parameters.hpp.
References ndn::nfd::CONTROL_PARAMETER_ORIGIN.
Referenced by ndn::nfd::RibRegisterCommand::applyDefaultsToRequest(), ndn::nfd::RibUnregisterCommand::applyDefaultsToRequest(), ndn::util::DummyClientFace::DummyClientFace(), and nfd::rib::AutoPrefixPropagator::loadConfig().
|
inline |
Definition at line 243 of file control-parameters.hpp.
References ndn::nfd::CONTROL_PARAMETER_ORIGIN.
|
inline |
Definition at line 251 of file control-parameters.hpp.
References ndn::nfd::CONTROL_PARAMETER_COST.
Referenced by ndn::nfd::FibAddNextHopCommand::applyDefaultsToRequest(), ndn::nfd::RibRegisterCommand::applyDefaultsToRequest(), getCost(), ndn::nfd::operator<<(), wireDecode(), and wireEncode().
|
inline |
Definition at line 257 of file control-parameters.hpp.
References hasCost().
Referenced by nfd::rib::AutoPrefixPropagator::disable(), nfd::FibManager::FibManager(), nfd::rib::RibManager::onRibUpdateFailure(), and ndn::nfd::operator<<().
|
inline |
Definition at line 264 of file control-parameters.hpp.
References ndn::nfd::CONTROL_PARAMETER_COST.
Referenced by ndn::nfd::FibAddNextHopCommand::applyDefaultsToRequest(), ndn::nfd::RibRegisterCommand::applyDefaultsToRequest(), nfd::rib::AutoPrefixPropagator::disable(), ndn::util::DummyClientFace::DummyClientFace(), and nfd::rib::AutoPrefixPropagator::loadConfig().
|
inline |
Definition at line 273 of file control-parameters.hpp.
References ndn::nfd::CONTROL_PARAMETER_COST.
Referenced by nfd::rib::AutoPrefixPropagator::disable().
|
inline |
Definition at line 281 of file control-parameters.hpp.
References ndn::nfd::CONTROL_PARAMETER_FLAGS.
Referenced by ndn::nfd::RibRegisterCommand::applyDefaultsToRequest(), getFlagBit(), getFlags(), ndn::nfd::operator<<(), setFlagBit(), ndn::nfd::FaceCreateCommand::validateRequest(), ndn::nfd::FaceUpdateCommand::validateRequest(), wireDecode(), and wireEncode().
|
inline |
Definition at line 287 of file control-parameters.hpp.
References hasFlags().
Referenced by getFlagBit(), nfd::rib::RibManager::onRibUpdateFailure(), ndn::nfd::operator<<(), and setFlagBit().
|
inline |
Definition at line 294 of file control-parameters.hpp.
References ndn::nfd::CONTROL_PARAMETER_FLAGS.
Referenced by ndn::nfd::RibRegisterCommand::applyDefaultsToRequest(), face::Face::Impl::registerPrefix(), and setFlagBit().
|
inline |
Definition at line 303 of file control-parameters.hpp.
References ndn::nfd::CONTROL_PARAMETER_FLAGS.
Referenced by unsetFlagBit().
|
inline |
Definition at line 311 of file control-parameters.hpp.
References ndn::nfd::CONTROL_PARAMETER_MASK.
Referenced by getMask(), hasFlagBit(), ndn::nfd::operator<<(), setFlagBit(), unsetFlagBit(), ndn::nfd::FaceCreateCommand::validateRequest(), ndn::nfd::FaceUpdateCommand::validateRequest(), wireDecode(), and wireEncode().
|
inline |
Definition at line 317 of file control-parameters.hpp.
References hasMask().
Referenced by hasFlagBit(), ndn::nfd::operator<<(), setFlagBit(), and unsetFlagBit().
|
inline |
Definition at line 324 of file control-parameters.hpp.
References ndn::nfd::CONTROL_PARAMETER_MASK.
Referenced by setFlagBit(), and unsetFlagBit().
|
inline |
Definition at line 333 of file control-parameters.hpp.
References ndn::nfd::CONTROL_PARAMETER_MASK.
Referenced by unsetFlagBit().
|
inline |
Definition at line 341 of file control-parameters.hpp.
References ndn::nfd::CONTROL_PARAMETER_STRATEGY.
Referenced by getStrategy(), ndn::nfd::operator<<(), wireDecode(), and wireEncode().
|
inline |
Definition at line 347 of file control-parameters.hpp.
References hasStrategy().
Referenced by ndn::nfd::operator<<(), and nfd::StrategyChoiceManager::StrategyChoiceManager().
|
inline |
Definition at line 354 of file control-parameters.hpp.
References ndn::nfd::CONTROL_PARAMETER_STRATEGY.
Referenced by nfd::StrategyChoiceManager::StrategyChoiceManager().
|
inline |
Definition at line 363 of file control-parameters.hpp.
References ndn::nfd::CONTROL_PARAMETER_STRATEGY.
|
inline |
Definition at line 371 of file control-parameters.hpp.
References ndn::nfd::CONTROL_PARAMETER_EXPIRATION_PERIOD, and websocketpp::lib::asio::milliseconds().
Referenced by getExpirationPeriod(), nfd::rib::RibManager::onRibUpdateFailure(), ndn::nfd::operator<<(), wireDecode(), and wireEncode().
|
inline |
Definition at line 377 of file control-parameters.hpp.
References hasExpirationPeriod().
Referenced by nfd::rib::RibManager::onRibUpdateFailure(), and ndn::nfd::operator<<().
|
inline |
Definition at line 384 of file control-parameters.hpp.
References ndn::nfd::CONTROL_PARAMETER_EXPIRATION_PERIOD.
|
inline |
Definition at line 393 of file control-parameters.hpp.
References ndn::nfd::CONTROL_PARAMETER_EXPIRATION_PERIOD.
|
inline |
Definition at line 401 of file control-parameters.hpp.
References ndn::nfd::CONTROL_PARAMETER_FACE_PERSISTENCY.
Referenced by ndn::nfd::FaceCreateCommand::applyDefaultsToRequest(), getFacePersistency(), ndn::nfd::operator<<(), nfd::FaceManager::setConfigFile(), wireDecode(), and wireEncode().
|
inline |
Definition at line 407 of file control-parameters.hpp.
References hasFacePersistency().
Referenced by ndn::nfd::operator<<(), and nfd::FaceManager::setConfigFile().
|
inline |
Definition at line 414 of file control-parameters.hpp.
References ndn::nfd::CONTROL_PARAMETER_FACE_PERSISTENCY.
Referenced by ndn::nfd::FaceCreateCommand::applyDefaultsToRequest(), and nfd::FaceManager::setConfigFile().
|
inline |
Definition at line 423 of file control-parameters.hpp.
References ndn::nfd::CONTROL_PARAMETER_FACE_PERSISTENCY.
|
inline |
Definition at line 431 of file control-parameters.hpp.
References getFlagBit(), hasFlagBit(), websocketpp::lib::asio::milliseconds(), ndn::nfd::NDN_CXX_DECLARE_WIRE_ENCODE_INSTANTIATIONS(), ndn::nfd::operator<<(), setFlagBit(), and unsetFlagBit().
Referenced by ndn::nfd::ControlCommand::FieldValidator::validate().
bool ndn::nfd::ControlParameters::hasFlagBit | ( | size_t | bit | ) | const |
bit | bit position within range [0, 64) (least significant bit is 0) |
Definition at line 197 of file control-parameters.cpp.
References getMask(), and hasMask().
Referenced by getPresentFields(), and nfd::FaceManager::setConfigFile().
bool ndn::nfd::ControlParameters::getFlagBit | ( | size_t | bit | ) | const |
bit | bit position within range [0, 64) (least significant bit is 0) |
Definition at line 211 of file control-parameters.cpp.
References getFlags(), and hasFlags().
Referenced by getPresentFields(), and nfd::FaceManager::setConfigFile().
ControlParameters & ndn::nfd::ControlParameters::setFlagBit | ( | size_t | bit, |
bool | value, | ||
bool | wantMask = true |
||
) |
set a bit in Flags
bit | bit position within range [0, 64) (least significant bit is 0) |
value | new value in Flags |
wantMask | if true, enable the bit in Mask |
Definition at line 225 of file control-parameters.cpp.
References getFlags(), getMask(), hasFlags(), hasMask(), setFlags(), and setMask().
Referenced by getPresentFields(), and nfd::FaceManager::setConfigFile().
ControlParameters & ndn::nfd::ControlParameters::unsetFlagBit | ( | size_t | bit | ) |
disable a bit in Mask
bit | bit position within range [0, 64) (least significant bit is 0) |
Definition at line 250 of file control-parameters.cpp.
References getMask(), hasMask(), setMask(), unsetFlags(), and unsetMask().
Referenced by getPresentFields().