22 #ifndef NDN_CXX_MGMT_NFD_CONTROL_PARAMETERS_HPP
23 #define NDN_CXX_MGMT_NFD_CONTROL_PARAMETERS_HPP
70 "BaseCongestionMarkingInterval",
71 "DefaultCongestionThreshold",
95 template<encoding::Tag TAG>
175 BOOST_ASSERT(this->
hasUri());
213 m_localUri = localUri;
303 m_capacity = capacity;
423 m_strategy = strategy;
446 return m_expirationPeriod;
453 m_expirationPeriod = expirationPeriod;
476 return m_facePersistency;
483 m_facePersistency = persistency;
506 return m_baseCongestionMarkingInterval;
513 m_baseCongestionMarkingInterval = interval;
538 return m_defaultCongestionThreshold;
547 m_defaultCongestionThreshold = threshold;
573 BOOST_ASSERT(this->
hasMtu());
598 const std::vector<bool>&
626 setFlagBit(
size_t bit,
bool value,
bool wantMask =
true);
637 std::vector<bool> m_hasFields;
642 std::string m_localUri;
653 uint64_t m_defaultCongestionThreshold;
657 mutable Block m_wire;
Represents a TLV element of the NDN packet format.
void reset() noexcept
Reset the Block to a default-constructed state.
Represents an absolute name.
base class for a struct that contains ControlCommand parameters
represents parameters in a ControlCommand request or response
ControlParameters & setOrigin(RouteOrigin origin)
ControlParameters & unsetStrategy()
uint64_t getFlags() const
ControlParameters & setCost(uint64_t cost)
void wireDecode(const Block &wire) final
ControlParameters & unsetLocalUri()
ControlParameters & unsetCost()
uint64_t getFaceId() const
ControlParameters & unsetFlags()
ControlParameters & setDefaultCongestionThreshold(uint64_t threshold)
set default congestion threshold (measured in bytes)
const std::vector< bool > & getPresentFields() const
ControlParameters & unsetMask()
uint64_t getCapacity() const
ControlParameters & setMtu(uint64_t mtu)
set MTU (measured in bytes)
ControlParameters & setLocalUri(const std::string &localUri)
ControlParameters & unsetUri()
ControlParameters & setCapacity(uint64_t capacity)
Block wireEncode() const final
ControlParameters & setFacePersistency(FacePersistency persistency)
ControlParameters & unsetFlagBit(size_t bit)
disable a bit in Mask
ControlParameters & unsetName()
ControlParameters & unsetExpirationPeriod()
uint64_t getDefaultCongestionThreshold() const
get default congestion threshold (measured in bytes)
ControlParameters & unsetDefaultCongestionThreshold()
bool hasExpirationPeriod() const
ControlParameters & unsetFacePersistency()
ControlParameters & setCount(uint64_t count)
bool hasBaseCongestionMarkingInterval() const
ControlParameters & unsetMtu()
ControlParameters & unsetCount()
bool hasFacePersistency() const
FacePersistency getFacePersistency() const
bool hasDefaultCongestionThreshold() const
ControlParameters & setStrategy(const Name &strategy)
ControlParameters & setExpirationPeriod(const time::milliseconds &expirationPeriod)
const std::string & getUri() const
ControlParameters & unsetOrigin()
ControlParameters & unsetFaceId()
ControlParameters & setFlagBit(size_t bit, bool value, bool wantMask=true)
set a bit in Flags
ControlParameters & setFlags(uint64_t flags)
uint64_t getCount() const
ControlParameters & unsetBaseCongestionMarkingInterval()
bool hasFlagBit(size_t bit) const
ControlParameters & setBaseCongestionMarkingInterval(time::nanoseconds interval)
const std::string & getLocalUri() const
const Name & getName() const
ControlParameters & setFaceId(uint64_t faceId)
const Name & getStrategy() const
const time::milliseconds & getExpirationPeriod() const
ControlParameters & setName(const Name &name)
ControlParameters & setUri(const std::string &uri)
ControlParameters & setMask(uint64_t mask)
ControlParameters & unsetCapacity()
bool getFlagBit(size_t bit) const
RouteOrigin getOrigin() const
time::nanoseconds getBaseCongestionMarkingInterval() const
uint64_t getMtu() const
get MTU (measured in bytes)
represents an error in TLV encoding or decoding
Error(const char *expectedType, uint32_t actualType)
#define NDN_CXX_DECLARE_WIRE_ENCODE_INSTANTIATIONS(ClassName)
@ CONTROL_PARAMETER_STRATEGY
@ CONTROL_PARAMETER_FACE_PERSISTENCY
@ CONTROL_PARAMETER_UBOUND
@ CONTROL_PARAMETER_DEFAULT_CONGESTION_THRESHOLD
@ CONTROL_PARAMETER_LOCAL_URI
@ CONTROL_PARAMETER_CAPACITY
@ CONTROL_PARAMETER_EXPIRATION_PERIOD
@ CONTROL_PARAMETER_FLAGS
@ CONTROL_PARAMETER_FACE_ID
@ CONTROL_PARAMETER_COUNT
@ CONTROL_PARAMETER_ORIGIN
@ CONTROL_PARAMETER_BASE_CONGESTION_MARKING_INTERVAL
const std::string CONTROL_PARAMETER_FIELD[CONTROL_PARAMETER_UBOUND]
std::ostream & operator<<(std::ostream &os, FaceScope faceScope)
boost::chrono::milliseconds milliseconds
boost::chrono::nanoseconds nanoseconds