22 #ifndef NDN_MGMT_NFD_CONTROL_PARAMETERS_HPP 23 #define NDN_MGMT_NFD_CONTROL_PARAMETERS_HPP 25 #include "../../encoding/nfd-constants.hpp" 26 #include "../../name.hpp" 27 #include "../../util/time.hpp" 28 #include "../control-parameters.hpp" 69 "BaseCongestionMarkingInterval",
70 "DefaultCongestionThreshold" 97 template<encoding::Tag TAG>
177 BOOST_ASSERT(this->
hasUri());
215 m_localUri = localUri;
305 m_capacity = capacity;
425 m_strategy = strategy;
444 const time::milliseconds&
448 return m_expirationPeriod;
455 m_expirationPeriod = expirationPeriod;
478 return m_facePersistency;
485 m_facePersistency = persistency;
508 return m_baseCongestionMarkingInterval;
515 m_baseCongestionMarkingInterval = interval;
540 return m_defaultCongestionThreshold;
549 m_defaultCongestionThreshold = threshold;
562 const std::vector<bool>&
590 setFlagBit(
size_t bit,
bool value,
bool wantMask =
true);
601 std::vector<bool> m_hasFields;
606 std::string m_localUri;
614 time::milliseconds m_expirationPeriod;
616 time::nanoseconds m_baseCongestionMarkingInterval;
617 uint64_t m_defaultCongestionThreshold;
620 mutable Block m_wire;
631 #endif // NDN_MGMT_NFD_CONTROL_PARAMETERS_HPP
uint64_t getFlags() const
ControlParameters & setFaceId(uint64_t faceId)
void wireDecode(const Block &wire) final
Copyright (c) 2011-2015 Regents of the University of California.
ControlParameters & unsetStrategy()
represents parameters in a ControlCommand request or response
time::nanoseconds getBaseCongestionMarkingInterval() const
ControlParameters & unsetBaseCongestionMarkingInterval()
ControlParameters & setFlags(uint64_t flags)
ControlParameters & unsetFaceId()
ControlParameters & unsetMask()
Represents a TLV element of NDN packet format.
ControlParameters & unsetCost()
Error(const std::string &what)
ControlParameters & unsetFlags()
bool hasBaseCongestionMarkingInterval() const
ControlParameters & setUri(const std::string &uri)
ControlParameters & unsetOrigin()
ControlParameters & setStrategy(const Name &strategy)
ControlParameters & setExpirationPeriod(const time::milliseconds &expirationPeriod)
ControlParameters & unsetFlagBit(size_t bit)
disable a bit in Mask
uint64_t getCapacity() const
FacePersistency getFacePersistency() const
const Name & getName() const
uint64_t getCount() const
Block wireEncode() const final
Copyright (c) 2011-2015 Regents of the University of California.
ControlParameters & setBaseCongestionMarkingInterval(time::nanoseconds interval)
const std::string & getLocalUri() const
ControlParameters & unsetExpirationPeriod()
ControlParameters & unsetFacePersistency()
uint64_t getDefaultCongestionThreshold() const
get default congestion threshold (measured in bytes)
bool hasExpirationPeriod() const
ControlParameters & unsetLocalUri()
RouteOrigin getOrigin() const
std::ostream & operator<<(std::ostream &os, FaceScope faceScope)
void reset()
Reset wire buffer of the element.
Represents an absolute name.
const std::string CONTROL_PARAMETER_FIELD[CONTROL_PARAMETER_UBOUND]
bool hasFlagBit(size_t bit) const
const std::vector< bool > & getPresentFields() const
uint64_t getFaceId() const
base class for a struct that contains ControlCommand parameters
const std::string & getUri() const
ControlParameters & unsetCapacity()
ControlParameters & setCost(uint64_t cost)
bool hasFacePersistency() const
const time::milliseconds & getExpirationPeriod() const
NDN_CXX_DECLARE_WIRE_ENCODE_INSTANTIATIONS(ChannelStatus)
ControlParameters & setName(const Name &name)
ControlParameters & setFacePersistency(FacePersistency persistency)
ControlParameters & unsetCount()
ControlParameters & setOrigin(RouteOrigin origin)
ControlParameters & setDefaultCongestionThreshold(uint64_t threshold)
set default congestion threshold (measured in bytes)
bool hasDefaultCongestionThreshold() const
ControlParameters & setCapacity(uint64_t capacity)
bool getFlagBit(size_t bit) const
ControlParameters & unsetName()
ControlParameters & unsetUri()
ControlParameters & setCount(uint64_t count)
const Name & getStrategy() const
ControlParameters & setMask(uint64_t mask)
ControlParameters & setFlagBit(size_t bit, bool value, bool wantMask=true)
set a bit in Flags
ControlParameters & unsetDefaultCongestionThreshold()
represents an error in TLV encoding or decoding
ControlParameters & setLocalUri(const std::string &localUri)