NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.3: NDN, CCN, CCNx, content centric networks
API Documentation
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)
 
template<encoding::Tag TAG>
size_t wireEncode (EncodingImpl< TAG > &encoder) const
 
virtual Block wireEncode () const final
 
virtual void wireDecode (const Block &wire) final
 
bool hasName () const
 
const NamegetName () const
 
ControlParameterssetName (const Name &name)
 
ControlParametersunsetName ()
 
bool hasFaceId () const
 
uint64_t getFaceId () const
 
ControlParameterssetFaceId (uint64_t faceId)
 
ControlParametersunsetFaceId ()
 
bool hasUri () const
 
const std::string & getUri () const
 
ControlParameterssetUri (const std::string &uri)
 
ControlParametersunsetUri ()
 
bool hasLocalControlFeature () const
 
LocalControlFeature getLocalControlFeature () const
 
ControlParameterssetLocalControlFeature (LocalControlFeature localControlFeature)
 
ControlParametersunsetLocalControlFeature ()
 
bool hasOrigin () const
 
uint64_t getOrigin () const
 
ControlParameterssetOrigin (uint64_t origin)
 
ControlParametersunsetOrigin ()
 
bool hasCost () const
 
uint64_t getCost () const
 
ControlParameterssetCost (uint64_t cost)
 
ControlParametersunsetCost ()
 
bool hasFlags () const
 
uint64_t getFlags () const
 
ControlParameterssetFlags (uint64_t flags)
 
ControlParametersunsetFlags ()
 
bool hasMask () const
 
uint64_t getMask () const
 
ControlParameterssetMask (uint64_t mask)
 
ControlParametersunsetMask ()
 
bool hasStrategy () const
 
const NamegetStrategy () const
 
ControlParameterssetStrategy (const Name &strategy)
 
ControlParametersunsetStrategy ()
 
bool hasExpirationPeriod () const
 
const time::milliseconds & getExpirationPeriod () const
 
ControlParameterssetExpirationPeriod (const time::milliseconds &expirationPeriod)
 
ControlParametersunsetExpirationPeriod ()
 
bool hasFacePersistency () const
 
FacePersistency getFacePersistency () const
 
ControlParameterssetFacePersistency (FacePersistency persistency)
 
ControlParametersunsetFacePersistency ()
 
const std::vector< bool > & getPresentFields () const
 
bool hasFlagBit (size_t bit) const
 
bool getFlagBit (size_t bit) const
 
ControlParameterssetFlagBit (size_t bit, bool value, bool wantMask=true)
 set a bit in Flags More...
 
ControlParametersunsetFlagBit (size_t bit)
 disable a bit in Mask More...
 

Detailed Description

represents parameters in a ControlCommand request or response

See also
http://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 36 of file control-parameters.cpp.

Referenced by ndn::nfd::ControlParameters::Error::Error().

◆ ControlParameters() [2/2]

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

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

References wireDecode().

Member Function Documentation

◆ wireEncode() [1/2]

◆ wireEncode() [2/2]

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

◆ wireDecode()

◆ hasName()

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

◆ getName()

◆ setName()

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

◆ unsetName()

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

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

References ndn::nfd::CONTROL_PARAMETER_NAME.

◆ hasFaceId()

◆ getFaceId()

◆ setFaceId()

◆ unsetFaceId()

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

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

References ndn::nfd::CONTROL_PARAMETER_FACE_ID.

◆ hasUri()

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

◆ getUri()

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

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

References hasUri().

Referenced by ndn::nfd::operator<<(), and nfd::FaceManager::setConfigFile().

◆ setUri()

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

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

References ndn::nfd::CONTROL_PARAMETER_URI.

◆ unsetUri()

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

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

References ndn::nfd::CONTROL_PARAMETER_URI.

◆ hasLocalControlFeature()

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

◆ getLocalControlFeature()

LocalControlFeature ndn::nfd::ControlParameters::getLocalControlFeature ( ) const
inline
Deprecated:
use Flags+Mask fields instead

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

References hasLocalControlFeature().

Referenced by ndn::nfd::operator<<(), and ndn::nfd::FaceLocalControlCommand::validateRequest().

◆ setLocalControlFeature()

ControlParameters& ndn::nfd::ControlParameters::setLocalControlFeature ( LocalControlFeature  localControlFeature)
inline
Deprecated:
use Flags+Mask fields instead

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

References ndn::nfd::CONTROL_PARAMETER_LOCAL_CONTROL_FEATURE.

◆ unsetLocalControlFeature()

ControlParameters& ndn::nfd::ControlParameters::unsetLocalControlFeature ( )
inline
Deprecated:
use Flags+Mask fields instead

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

References ndn::nfd::CONTROL_PARAMETER_LOCAL_CONTROL_FEATURE.

◆ hasOrigin()

◆ getOrigin()

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

◆ setOrigin()

◆ unsetOrigin()

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

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

References ndn::nfd::CONTROL_PARAMETER_ORIGIN.

◆ hasCost()

◆ getCost()

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

◆ setCost()

◆ unsetCost()

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

◆ hasFlags()

◆ getFlags()

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

◆ setFlags()

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

◆ unsetFlags()

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

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

References ndn::nfd::CONTROL_PARAMETER_FLAGS.

Referenced by unsetFlagBit().

◆ hasMask()

◆ getMask()

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

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

References hasMask().

Referenced by hasFlagBit(), ndn::nfd::operator<<(), setFlagBit(), and unsetFlagBit().

◆ setMask()

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

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

References ndn::nfd::CONTROL_PARAMETER_MASK.

Referenced by setFlagBit(), and unsetFlagBit().

◆ unsetMask()

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

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

References ndn::nfd::CONTROL_PARAMETER_MASK.

Referenced by unsetFlagBit().

◆ hasStrategy()

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

◆ getStrategy()

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

◆ setStrategy()

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

◆ unsetStrategy()

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

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

References ndn::nfd::CONTROL_PARAMETER_STRATEGY.

◆ hasExpirationPeriod()

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

◆ getExpirationPeriod()

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

◆ setExpirationPeriod()

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

◆ unsetExpirationPeriod()

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

◆ hasFacePersistency()

◆ getFacePersistency()

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

◆ setFacePersistency()

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

◆ unsetFacePersistency()

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

◆ getPresentFields()

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

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

References getMask(), and hasMask().

Referenced by getPresentFields(), and nfd::FaceManager::setConfigFile().

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

References getFlags(), and hasFlags().

Referenced by getPresentFields(), and nfd::FaceManager::setConfigFile().

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

References getFlags(), getMask(), hasFlags(), hasMask(), setFlags(), and setMask().

Referenced by getPresentFields(), and nfd::FaceManager::setConfigFile().

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

References getMask(), hasMask(), setMask(), unsetFlags(), and unsetMask().

Referenced by getPresentFields().


The documentation for this class was generated from the following files: