ndn::nfd::ControlParameters Class Reference

Represents parameters in a ControlCommand request or response. More...

#include <ndn-cxx/mgmt/nfd/control-parameters.hpp>

+ Inheritance diagram for ndn::nfd::ControlParameters:
+ Collaboration diagram for ndn::nfd::ControlParameters:

Classes

class  Error
 

Public Member Functions

 ControlParameters ()
 
 ControlParameters (const Block &block)
 
time::nanoseconds getBaseCongestionMarkingInterval () const
 
uint64_t getCapacity () const
 
uint64_t getCost () const
 
uint64_t getCount () const
 
uint64_t getDefaultCongestionThreshold () const
 Get default congestion threshold (measured in bytes). More...
 
const time::millisecondsgetExpirationPeriod () const
 
uint64_t getFaceId () const
 
FacePersistency getFacePersistency () const
 
bool getFlagBit (size_t bit) const
 
uint64_t getFlags () const
 
const std::string & getLocalUri () const
 
uint64_t getMask () const
 
uint64_t getMtu () const
 Get MTU (measured in bytes). More...
 
const NamegetName () const
 
RouteOrigin getOrigin () const
 
auto getPresentFields () const noexcept
 
const NamegetStrategy () const
 
const std::string & getUri () const
 
bool hasBaseCongestionMarkingInterval () const
 
bool hasCapacity () const
 
bool hasCost () const
 
bool hasCount () const
 
bool hasDefaultCongestionThreshold () const
 
bool hasExpirationPeriod () const
 
bool hasFaceId () const
 
bool hasFacePersistency () const
 
bool hasFlagBit (size_t bit) const
 
bool hasFlags () const
 
bool hasLocalUri () const
 
bool hasMask () const
 
bool hasMtu () const
 
bool hasName () const
 
bool hasOrigin () const
 
bool hasStrategy () const
 
bool hasUri () const
 
ControlParameterssetBaseCongestionMarkingInterval (time::nanoseconds interval)
 
ControlParameterssetCapacity (uint64_t capacity)
 
ControlParameterssetCost (uint64_t cost)
 
ControlParameterssetCount (uint64_t count)
 
ControlParameterssetDefaultCongestionThreshold (uint64_t threshold)
 Set default congestion threshold (measured in bytes). More...
 
ControlParameterssetExpirationPeriod (const time::milliseconds &expirationPeriod)
 
ControlParameterssetFaceId (uint64_t faceId)
 
ControlParameterssetFacePersistency (FacePersistency persistency)
 
ControlParameterssetFlagBit (size_t bit, bool value, bool wantMask=true)
 Set a bit in Flags. More...
 
ControlParameterssetFlags (uint64_t flags)
 
ControlParameterssetLocalUri (const std::string &localUri)
 
ControlParameterssetMask (uint64_t mask)
 
ControlParameterssetMtu (uint64_t mtu)
 Set MTU (measured in bytes). More...
 
ControlParameterssetName (const Name &name)
 
ControlParameterssetOrigin (RouteOrigin origin)
 
ControlParameterssetStrategy (const Name &strategy)
 
ControlParameterssetUri (const std::string &uri)
 
ControlParametersunsetBaseCongestionMarkingInterval ()
 
ControlParametersunsetCapacity ()
 
ControlParametersunsetCost ()
 
ControlParametersunsetCount ()
 
ControlParametersunsetDefaultCongestionThreshold ()
 
ControlParametersunsetExpirationPeriod ()
 
ControlParametersunsetFaceId ()
 
ControlParametersunsetFacePersistency ()
 
ControlParametersunsetFlagBit (size_t bit)
 Disable a bit in Mask. More...
 
ControlParametersunsetFlags ()
 
ControlParametersunsetLocalUri ()
 
ControlParametersunsetMask ()
 
ControlParametersunsetMtu ()
 
ControlParametersunsetName ()
 
ControlParametersunsetOrigin ()
 
ControlParametersunsetStrategy ()
 
ControlParametersunsetUri ()
 
void wireDecode (const Block &wire) final
 
Block wireEncode () const final
 
template<encoding::Tag TAG>
size_t wireEncode (EncodingImpl< TAG > &encoder) const
 

Detailed Description

Represents parameters in a ControlCommand request or response.

See also
https://redmine.named-data.net/projects/nfd/wiki/ControlCommand#ControlParameters

This type is copyable because it's an abstraction of a TLV type.

Definition at line 83 of file control-parameters.hpp.

Constructor & Destructor Documentation

◆ ControlParameters() [1/2]

ndn::nfd::ControlParameters::ControlParameters ( )
default

◆ ControlParameters() [2/2]

ndn::nfd::ControlParameters::ControlParameters ( const Block block)
explicit

Definition at line 33 of file control-parameters.cpp.

Member Function Documentation

◆ getBaseCongestionMarkingInterval()

time::nanoseconds ndn::nfd::ControlParameters::getBaseCongestionMarkingInterval ( ) const
inline

Definition at line 505 of file control-parameters.hpp.

◆ getCapacity()

uint64_t ndn::nfd::ControlParameters::getCapacity ( ) const
inline

Definition at line 295 of file control-parameters.hpp.

◆ getCost()

uint64_t ndn::nfd::ControlParameters::getCost ( ) const
inline

Definition at line 265 of file control-parameters.hpp.

◆ getCount()

uint64_t ndn::nfd::ControlParameters::getCount ( ) const
inline

Definition at line 325 of file control-parameters.hpp.

◆ getDefaultCongestionThreshold()

uint64_t ndn::nfd::ControlParameters::getDefaultCongestionThreshold ( ) const
inline

Get default congestion threshold (measured in bytes).

Definition at line 537 of file control-parameters.hpp.

◆ getExpirationPeriod()

const time::milliseconds& ndn::nfd::ControlParameters::getExpirationPeriod ( ) const
inline

Definition at line 445 of file control-parameters.hpp.

◆ getFaceId()

uint64_t ndn::nfd::ControlParameters::getFaceId ( ) const
inline

Definition at line 145 of file control-parameters.hpp.

◆ getFacePersistency()

FacePersistency ndn::nfd::ControlParameters::getFacePersistency ( ) const
inline

Definition at line 475 of file control-parameters.hpp.

◆ getFlagBit()

bool ndn::nfd::ControlParameters::getFlagBit ( size_t  bit) const
Returns
bit at a position in Flags
Parameters
bitbit position within range [0, 64) (least significant bit is 0)

Definition at line 222 of file control-parameters.cpp.

◆ getFlags()

uint64_t ndn::nfd::ControlParameters::getFlags ( ) const
inline

Definition at line 355 of file control-parameters.hpp.

◆ getLocalUri()

const std::string& ndn::nfd::ControlParameters::getLocalUri ( ) const
inline

Definition at line 205 of file control-parameters.hpp.

◆ getMask()

uint64_t ndn::nfd::ControlParameters::getMask ( ) const
inline

Definition at line 385 of file control-parameters.hpp.

◆ getMtu()

uint64_t ndn::nfd::ControlParameters::getMtu ( ) const
inline

Get MTU (measured in bytes).

This value is capped at MAX_NDN_PACKET_SIZE, even if the MTU of the face is unlimited.

Definition at line 573 of file control-parameters.hpp.

◆ getName()

const Name& ndn::nfd::ControlParameters::getName ( ) const
inline

Definition at line 115 of file control-parameters.hpp.

◆ getOrigin()

RouteOrigin ndn::nfd::ControlParameters::getOrigin ( ) const
inline

Definition at line 235 of file control-parameters.hpp.

◆ getPresentFields()

auto ndn::nfd::ControlParameters::getPresentFields ( ) const
inlinenoexcept

Definition at line 601 of file control-parameters.hpp.

◆ getStrategy()

const Name& ndn::nfd::ControlParameters::getStrategy ( ) const
inline

Definition at line 415 of file control-parameters.hpp.

◆ getUri()

const std::string& ndn::nfd::ControlParameters::getUri ( ) const
inline

Definition at line 175 of file control-parameters.hpp.

◆ hasBaseCongestionMarkingInterval()

bool ndn::nfd::ControlParameters::hasBaseCongestionMarkingInterval ( ) const
inline

Definition at line 499 of file control-parameters.hpp.

◆ hasCapacity()

bool ndn::nfd::ControlParameters::hasCapacity ( ) const
inline

Definition at line 289 of file control-parameters.hpp.

◆ hasCost()

bool ndn::nfd::ControlParameters::hasCost ( ) const
inline

Definition at line 259 of file control-parameters.hpp.

◆ hasCount()

bool ndn::nfd::ControlParameters::hasCount ( ) const
inline

Definition at line 319 of file control-parameters.hpp.

◆ hasDefaultCongestionThreshold()

bool ndn::nfd::ControlParameters::hasDefaultCongestionThreshold ( ) const
inline

Definition at line 529 of file control-parameters.hpp.

◆ hasExpirationPeriod()

bool ndn::nfd::ControlParameters::hasExpirationPeriod ( ) const
inline

Definition at line 439 of file control-parameters.hpp.

◆ hasFaceId()

bool ndn::nfd::ControlParameters::hasFaceId ( ) const
inline

Definition at line 139 of file control-parameters.hpp.

◆ hasFacePersistency()

bool ndn::nfd::ControlParameters::hasFacePersistency ( ) const
inline

Definition at line 469 of file control-parameters.hpp.

◆ hasFlagBit()

bool ndn::nfd::ControlParameters::hasFlagBit ( size_t  bit) const
Returns
whether bit is enabled in Mask
Parameters
bitbit position within range [0, 64) (least significant bit is 0)

Definition at line 208 of file control-parameters.cpp.

◆ hasFlags()

bool ndn::nfd::ControlParameters::hasFlags ( ) const
inline

Definition at line 349 of file control-parameters.hpp.

◆ hasLocalUri()

bool ndn::nfd::ControlParameters::hasLocalUri ( ) const
inline

Definition at line 199 of file control-parameters.hpp.

◆ hasMask()

bool ndn::nfd::ControlParameters::hasMask ( ) const
inline

Definition at line 379 of file control-parameters.hpp.

◆ hasMtu()

bool ndn::nfd::ControlParameters::hasMtu ( ) const
inline

Definition at line 563 of file control-parameters.hpp.

◆ hasName()

bool ndn::nfd::ControlParameters::hasName ( ) const
inline

Definition at line 109 of file control-parameters.hpp.

◆ hasOrigin()

bool ndn::nfd::ControlParameters::hasOrigin ( ) const
inline

Definition at line 229 of file control-parameters.hpp.

◆ hasStrategy()

bool ndn::nfd::ControlParameters::hasStrategy ( ) const
inline

Definition at line 409 of file control-parameters.hpp.

◆ hasUri()

bool ndn::nfd::ControlParameters::hasUri ( ) const
inline

Definition at line 169 of file control-parameters.hpp.

◆ setBaseCongestionMarkingInterval()

ControlParameters& ndn::nfd::ControlParameters::setBaseCongestionMarkingInterval ( time::nanoseconds  interval)
inline

Definition at line 512 of file control-parameters.hpp.

◆ setCapacity()

ControlParameters& ndn::nfd::ControlParameters::setCapacity ( uint64_t  capacity)
inline

Definition at line 302 of file control-parameters.hpp.

◆ setCost()

ControlParameters& ndn::nfd::ControlParameters::setCost ( uint64_t  cost)
inline

Definition at line 272 of file control-parameters.hpp.

◆ setCount()

ControlParameters& ndn::nfd::ControlParameters::setCount ( uint64_t  count)
inline

Definition at line 332 of file control-parameters.hpp.

◆ setDefaultCongestionThreshold()

ControlParameters& ndn::nfd::ControlParameters::setDefaultCongestionThreshold ( uint64_t  threshold)
inline

Set default congestion threshold (measured in bytes).

Definition at line 546 of file control-parameters.hpp.

◆ setExpirationPeriod()

ControlParameters& ndn::nfd::ControlParameters::setExpirationPeriod ( const time::milliseconds expirationPeriod)
inline

Definition at line 452 of file control-parameters.hpp.

◆ setFaceId()

ControlParameters& ndn::nfd::ControlParameters::setFaceId ( uint64_t  faceId)
inline

Definition at line 152 of file control-parameters.hpp.

◆ setFacePersistency()

ControlParameters& ndn::nfd::ControlParameters::setFacePersistency ( FacePersistency  persistency)
inline

Definition at line 482 of file control-parameters.hpp.

◆ setFlagBit()

ControlParameters & ndn::nfd::ControlParameters::setFlagBit ( size_t  bit,
bool  value,
bool  wantMask = true 
)

Set a bit in Flags.

Parameters
bitbit position within range [0, 64) (least significant bit is 0)
valuenew value in Flags
wantMaskif true, enable the bit in Mask

Definition at line 236 of file control-parameters.cpp.

◆ setFlags()

ControlParameters& ndn::nfd::ControlParameters::setFlags ( uint64_t  flags)
inline

Definition at line 362 of file control-parameters.hpp.

◆ setLocalUri()

ControlParameters& ndn::nfd::ControlParameters::setLocalUri ( const std::string &  localUri)
inline

Definition at line 212 of file control-parameters.hpp.

◆ setMask()

ControlParameters& ndn::nfd::ControlParameters::setMask ( uint64_t  mask)
inline

Definition at line 392 of file control-parameters.hpp.

◆ setMtu()

ControlParameters& ndn::nfd::ControlParameters::setMtu ( uint64_t  mtu)
inline

Set MTU (measured in bytes).

This value is capped at MAX_NDN_PACKET_SIZE, even if the MTU of the face is unlimited.

Definition at line 584 of file control-parameters.hpp.

◆ setName()

ControlParameters& ndn::nfd::ControlParameters::setName ( const Name name)
inline

Definition at line 122 of file control-parameters.hpp.

◆ setOrigin()

ControlParameters& ndn::nfd::ControlParameters::setOrigin ( RouteOrigin  origin)
inline

Definition at line 242 of file control-parameters.hpp.

◆ setStrategy()

ControlParameters& ndn::nfd::ControlParameters::setStrategy ( const Name strategy)
inline

Definition at line 422 of file control-parameters.hpp.

◆ setUri()

ControlParameters& ndn::nfd::ControlParameters::setUri ( const std::string &  uri)
inline

Definition at line 182 of file control-parameters.hpp.

◆ unsetBaseCongestionMarkingInterval()

ControlParameters& ndn::nfd::ControlParameters::unsetBaseCongestionMarkingInterval ( )
inline

Definition at line 521 of file control-parameters.hpp.

◆ unsetCapacity()

ControlParameters& ndn::nfd::ControlParameters::unsetCapacity ( )
inline

Definition at line 311 of file control-parameters.hpp.

◆ unsetCost()

ControlParameters& ndn::nfd::ControlParameters::unsetCost ( )
inline

Definition at line 281 of file control-parameters.hpp.

◆ unsetCount()

ControlParameters& ndn::nfd::ControlParameters::unsetCount ( )
inline

Definition at line 341 of file control-parameters.hpp.

◆ unsetDefaultCongestionThreshold()

ControlParameters& ndn::nfd::ControlParameters::unsetDefaultCongestionThreshold ( )
inline

Definition at line 555 of file control-parameters.hpp.

◆ unsetExpirationPeriod()

ControlParameters& ndn::nfd::ControlParameters::unsetExpirationPeriod ( )
inline

Definition at line 461 of file control-parameters.hpp.

◆ unsetFaceId()

ControlParameters& ndn::nfd::ControlParameters::unsetFaceId ( )
inline

Definition at line 161 of file control-parameters.hpp.

◆ unsetFacePersistency()

ControlParameters& ndn::nfd::ControlParameters::unsetFacePersistency ( )
inline

Definition at line 491 of file control-parameters.hpp.

◆ unsetFlagBit()

ControlParameters & ndn::nfd::ControlParameters::unsetFlagBit ( size_t  bit)

Disable a bit in Mask.

Parameters
bitbit position within range [0, 64) (least significant bit is 0)
Postcondition
If all bits are disabled, Flags and Mask fields are deleted.

Definition at line 261 of file control-parameters.cpp.

◆ unsetFlags()

ControlParameters& ndn::nfd::ControlParameters::unsetFlags ( )
inline

Definition at line 371 of file control-parameters.hpp.

◆ unsetLocalUri()

ControlParameters& ndn::nfd::ControlParameters::unsetLocalUri ( )
inline

Definition at line 221 of file control-parameters.hpp.

◆ unsetMask()

ControlParameters& ndn::nfd::ControlParameters::unsetMask ( )
inline

Definition at line 401 of file control-parameters.hpp.

◆ unsetMtu()

ControlParameters& ndn::nfd::ControlParameters::unsetMtu ( )
inline

Definition at line 593 of file control-parameters.hpp.

◆ unsetName()

ControlParameters& ndn::nfd::ControlParameters::unsetName ( )
inline

Definition at line 131 of file control-parameters.hpp.

◆ unsetOrigin()

ControlParameters& ndn::nfd::ControlParameters::unsetOrigin ( )
inline

Definition at line 251 of file control-parameters.hpp.

◆ unsetStrategy()

ControlParameters& ndn::nfd::ControlParameters::unsetStrategy ( )
inline

Definition at line 431 of file control-parameters.hpp.

◆ unsetUri()

ControlParameters& ndn::nfd::ControlParameters::unsetUri ( )
inline

Definition at line 191 of file control-parameters.hpp.

◆ wireDecode()

void ndn::nfd::ControlParameters::wireDecode ( const Block wire)
finalvirtual

Implements ndn::mgmt::ControlParametersBase.

Definition at line 120 of file control-parameters.cpp.

◆ wireEncode() [1/2]

Block ndn::nfd::ControlParameters::wireEncode ( ) const
finalvirtual

Implements ndn::mgmt::ControlParametersBase.

Definition at line 104 of file control-parameters.cpp.

◆ wireEncode() [2/2]

template<encoding::Tag TAG>
size_t ndn::nfd::ControlParameters::wireEncode ( EncodingImpl< TAG > &  encoder) const

Definition at line 40 of file control-parameters.cpp.