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 80 of file control-parameters.hpp.

Constructor & Destructor Documentation

◆ ControlParameters() [1/2]

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

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

◆ ControlParameters() [2/2]

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

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

Member Function Documentation

◆ getBaseCongestionMarkingInterval()

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

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

◆ getCapacity()

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

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

◆ getCost()

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

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

◆ getCount()

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

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

◆ getDefaultCongestionThreshold()

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

Get default congestion threshold (measured in bytes).

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

◆ getExpirationPeriod()

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

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

◆ getFaceId()

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

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

◆ getFacePersistency()

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

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

◆ getFlags()

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

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

◆ getLocalUri()

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

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

◆ getMask()

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

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

◆ getName()

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

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

◆ getOrigin()

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

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

◆ getPresentFields()

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

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

◆ getStrategy()

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

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

◆ getUri()

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

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

◆ hasBaseCongestionMarkingInterval()

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

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

◆ hasCapacity()

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

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

◆ hasCost()

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

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

◆ hasCount()

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

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

◆ hasDefaultCongestionThreshold()

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

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

◆ hasExpirationPeriod()

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

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

◆ hasFaceId()

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

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

◆ hasFacePersistency()

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

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

◆ hasFlags()

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

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

◆ hasLocalUri()

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

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

◆ hasMask()

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

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

◆ hasMtu()

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

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

◆ hasName()

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

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

◆ hasOrigin()

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

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

◆ hasStrategy()

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

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

◆ hasUri()

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

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

◆ setBaseCongestionMarkingInterval()

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

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

◆ setCapacity()

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

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

◆ setCost()

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

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

◆ setCount()

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

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

◆ setExpirationPeriod()

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

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

◆ setFaceId()

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

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

◆ setFacePersistency()

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

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

◆ setFlags()

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

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

◆ setLocalUri()

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

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

◆ setMask()

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

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

◆ setName()

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

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

◆ setOrigin()

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

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

◆ setStrategy()

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

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

◆ setUri()

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

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

◆ unsetBaseCongestionMarkingInterval()

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

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

◆ unsetCapacity()

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

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

◆ unsetCost()

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

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

◆ unsetCount()

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

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

◆ unsetDefaultCongestionThreshold()

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

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

◆ unsetExpirationPeriod()

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

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

◆ unsetFaceId()

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

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

◆ unsetFacePersistency()

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

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

◆ unsetFlags()

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

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

◆ unsetLocalUri()

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

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

◆ unsetMask()

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

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

◆ unsetMtu()

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

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

◆ unsetName()

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

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

◆ unsetOrigin()

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

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

◆ unsetStrategy()

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

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

◆ unsetUri()

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

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

◆ wireDecode()

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

Implements ndn::mgmt::ControlParameters.

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

◆ wireEncode() [1/2]

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

Implements ndn::mgmt::ControlParameters.

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