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
 
Block wireEncode () const final
 
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 hasLocalUri () const
 
const std::string & getLocalUri () const
 
ControlParameterssetLocalUri (const std::string &localUri)
 
ControlParametersunsetLocalUri ()
 
bool hasOrigin () const
 
RouteOrigin getOrigin () const
 
ControlParameterssetOrigin (RouteOrigin 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...
 
- Public Member Functions inherited from ndn::mgmt::ControlParameters
virtual ~ControlParameters ()=default
 

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

Constructor & Destructor Documentation

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

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

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

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

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

References wireDecode().

Member Function Documentation

Block ndn::nfd::ControlParameters::wireEncode ( ) const
finalvirtual
bool ndn::nfd::ControlParameters::hasName ( ) const
inline
ControlParameters& ndn::nfd::ControlParameters::setName ( const Name name)
inline
ControlParameters& ndn::nfd::ControlParameters::unsetName ( )
inline

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

References ndn::nfd::CONTROL_PARAMETER_NAME.

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

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

References ndn::nfd::CONTROL_PARAMETER_FACE_ID.

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

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

References hasUri().

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

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

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

References ndn::nfd::CONTROL_PARAMETER_URI.

Referenced by nfd::FaceManager::setConfigFile().

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

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

References ndn::nfd::CONTROL_PARAMETER_URI.

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

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

References hasLocalUri().

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

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

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

References ndn::nfd::CONTROL_PARAMETER_LOCAL_URI.

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

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

References ndn::nfd::CONTROL_PARAMETER_LOCAL_URI.

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

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

References ndn::nfd::CONTROL_PARAMETER_ORIGIN.

uint64_t ndn::nfd::ControlParameters::getCost ( ) const
inline
ControlParameters& ndn::nfd::ControlParameters::unsetCost ( )
inline
uint64_t ndn::nfd::ControlParameters::getFlags ( ) const
inline
ControlParameters& ndn::nfd::ControlParameters::setFlags ( uint64_t  flags)
inline
ControlParameters& ndn::nfd::ControlParameters::unsetFlags ( )
inline

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

References ndn::nfd::CONTROL_PARAMETER_FLAGS.

Referenced by unsetFlagBit().

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

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

References hasMask().

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

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

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

References ndn::nfd::CONTROL_PARAMETER_MASK.

Referenced by setFlagBit(), and unsetFlagBit().

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

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

References ndn::nfd::CONTROL_PARAMETER_MASK.

Referenced by unsetFlagBit().

bool ndn::nfd::ControlParameters::hasStrategy ( ) const
inline
const Name& ndn::nfd::ControlParameters::getStrategy ( ) const
inline
ControlParameters& ndn::nfd::ControlParameters::setStrategy ( const Name strategy)
inline
ControlParameters& ndn::nfd::ControlParameters::unsetStrategy ( )
inline

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

References ndn::nfd::CONTROL_PARAMETER_STRATEGY.

bool ndn::nfd::ControlParameters::hasExpirationPeriod ( ) const
inline
const time::milliseconds& ndn::nfd::ControlParameters::getExpirationPeriod ( ) const
inline
ControlParameters& ndn::nfd::ControlParameters::setExpirationPeriod ( const time::milliseconds &  expirationPeriod)
inline
ControlParameters& ndn::nfd::ControlParameters::unsetExpirationPeriod ( )
inline
FacePersistency ndn::nfd::ControlParameters::getFacePersistency ( ) const
inline
ControlParameters& ndn::nfd::ControlParameters::setFacePersistency ( FacePersistency  persistency)
inline
ControlParameters& ndn::nfd::ControlParameters::unsetFacePersistency ( )
inline
const std::vector<bool>& ndn::nfd::ControlParameters::getPresentFields ( ) const
inline
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.

References getMask(), and hasMask().

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

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.

References getFlags(), and hasFlags().

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

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.

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

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

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.

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

Referenced by getPresentFields().


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