ndn::nfd::ControlParameters Class Reference

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

#include <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)
 
uint64_t getCost () const
 
const time::milliseconds & getExpirationPeriod () 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
 
const NamegetName () const
 
RouteOrigin getOrigin () const
 
const std::vector< bool > & getPresentFields () const
 
const NamegetStrategy () const
 
const std::string & getUri () const
 
bool hasCost () 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 hasName () const
 
bool hasOrigin () const
 
bool hasStrategy () const
 
bool hasUri () const
 
ControlParameterssetCost (uint64_t cost)
 
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)
 
ControlParameterssetName (const Name &name)
 
ControlParameterssetOrigin (RouteOrigin origin)
 
ControlParameterssetStrategy (const Name &strategy)
 
ControlParameterssetUri (const std::string &uri)
 
ControlParametersunsetCost ()
 
ControlParametersunsetExpirationPeriod ()
 
ControlParametersunsetFaceId ()
 
ControlParametersunsetFacePersistency ()
 
ControlParametersunsetFlagBit (size_t bit)
 disable a bit in Mask More...
 
ControlParametersunsetFlags ()
 
ControlParametersunsetLocalUri ()
 
ControlParametersunsetMask ()
 
ControlParametersunsetName ()
 
ControlParametersunsetOrigin ()
 
ControlParametersunsetStrategy ()
 
ControlParametersunsetUri ()
 
void wireDecode (const Block &wire) final
 
template<encoding::Tag TAG>
size_t wireEncode (EncodingImpl< TAG > &encoder) const
 
Block wireEncode () const final
 

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 71 of file nfd/control-parameters.hpp.

Constructor & Destructor Documentation

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

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

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

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

Member Function Documentation

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

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

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

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

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

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

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

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

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 211 of file control-parameters.cpp.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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 197 of file control-parameters.cpp.

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

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

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

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

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

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

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

Definition at line 101 of file nfd/control-parameters.hpp.

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

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

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

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

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

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

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

Definition at line 264 of file nfd/control-parameters.hpp.

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

Definition at line 384 of file nfd/control-parameters.hpp.

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

Definition at line 144 of file nfd/control-parameters.hpp.

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

Definition at line 414 of file nfd/control-parameters.hpp.

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 225 of file control-parameters.cpp.

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

Definition at line 294 of file nfd/control-parameters.hpp.

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

Definition at line 204 of file nfd/control-parameters.hpp.

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

Definition at line 324 of file nfd/control-parameters.hpp.

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

Definition at line 114 of file nfd/control-parameters.hpp.

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

Definition at line 234 of file nfd/control-parameters.hpp.

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

Definition at line 354 of file nfd/control-parameters.hpp.

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

Definition at line 174 of file nfd/control-parameters.hpp.

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

Definition at line 273 of file nfd/control-parameters.hpp.

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

Definition at line 393 of file nfd/control-parameters.hpp.

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

Definition at line 153 of file nfd/control-parameters.hpp.

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

Definition at line 423 of file nfd/control-parameters.hpp.

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 250 of file control-parameters.cpp.

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

Definition at line 303 of file nfd/control-parameters.hpp.

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

Definition at line 213 of file nfd/control-parameters.hpp.

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

Definition at line 333 of file nfd/control-parameters.hpp.

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

Definition at line 123 of file nfd/control-parameters.hpp.

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

Definition at line 243 of file nfd/control-parameters.hpp.

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

Definition at line 363 of file nfd/control-parameters.hpp.

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

Definition at line 183 of file nfd/control-parameters.hpp.

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

Implements ndn::mgmt::ControlParameters.

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

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

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

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

Implements ndn::mgmt::ControlParameters.

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