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
 
const std::vector< bool > & getPresentFields () const
 
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 81 of file control-parameters.hpp.

Constructor & Destructor Documentation

◆ ControlParameters() [1/2]

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

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

◆ ControlParameters() [2/2]

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

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

Member Function Documentation

◆ getBaseCongestionMarkingInterval()

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

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

◆ getCapacity()

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

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

◆ getCost()

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

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

◆ getCount()

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

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

◆ getDefaultCongestionThreshold()

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

Get default congestion threshold (measured in bytes).

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

◆ getExpirationPeriod()

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

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

◆ getFaceId()

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

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

◆ getFacePersistency()

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

Definition at line 473 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 258 of file control-parameters.cpp.

◆ getFlags()

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

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

◆ getLocalUri()

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

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

◆ getMask()

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

Definition at line 383 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 571 of file control-parameters.hpp.

◆ getName()

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

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

◆ getOrigin()

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

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

◆ getPresentFields()

const std::vector<bool>& ndn::nfd::ControlParameters::getPresentFields ( ) const
inline

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

◆ getStrategy()

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

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

◆ getUri()

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

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

◆ hasBaseCongestionMarkingInterval()

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

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

◆ hasCapacity()

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

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

◆ hasCost()

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

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

◆ hasCount()

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

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

◆ hasDefaultCongestionThreshold()

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

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

◆ hasExpirationPeriod()

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

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

◆ hasFaceId()

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

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

◆ hasFacePersistency()

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

Definition at line 467 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 244 of file control-parameters.cpp.

◆ hasFlags()

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

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

◆ hasLocalUri()

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

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

◆ hasMask()

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

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

◆ hasMtu()

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

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

◆ hasName()

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

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

◆ hasOrigin()

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

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

◆ hasStrategy()

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

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

◆ hasUri()

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

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

◆ setBaseCongestionMarkingInterval()

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

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

◆ setCapacity()

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

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

◆ setCost()

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

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

◆ setCount()

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

Definition at line 330 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 544 of file control-parameters.hpp.

◆ setExpirationPeriod()

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

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

◆ setFaceId()

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

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

◆ setFacePersistency()

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

Definition at line 480 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 272 of file control-parameters.cpp.

◆ setFlags()

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

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

◆ setLocalUri()

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

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

◆ setMask()

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

Definition at line 390 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 582 of file control-parameters.hpp.

◆ setName()

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

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

◆ setOrigin()

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

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

◆ setStrategy()

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

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

◆ setUri()

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

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

◆ unsetBaseCongestionMarkingInterval()

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

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

◆ unsetCapacity()

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

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

◆ unsetCost()

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

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

◆ unsetCount()

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

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

◆ unsetDefaultCongestionThreshold()

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

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

◆ unsetExpirationPeriod()

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

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

◆ unsetFaceId()

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

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

◆ unsetFacePersistency()

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

Definition at line 489 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 297 of file control-parameters.cpp.

◆ unsetFlags()

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

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

◆ unsetLocalUri()

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

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

◆ unsetMask()

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

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

◆ unsetMtu()

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

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

◆ unsetName()

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

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

◆ unsetOrigin()

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

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

◆ unsetStrategy()

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

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

◆ unsetUri()

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

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

◆ wireDecode()

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

Implements ndn::mgmt::ControlParameters.

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

◆ wireEncode() [1/2]

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

Implements ndn::mgmt::ControlParameters.

Definition at line 114 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 50 of file control-parameters.cpp.