22#ifndef NDN_CXX_MGMT_NFD_CONTROL_PARAMETERS_HPP
23#define NDN_CXX_MGMT_NFD_CONTROL_PARAMETERS_HPP
72 "BaseCongestionMarkingInterval"sv,
73 "DefaultCongestionThreshold"sv,
97 template<encoding::Tag TAG>
177 BOOST_ASSERT(this->
hasUri());
215 m_localUri = localUri;
305 m_capacity = capacity;
425 m_strategy = strategy;
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;
575 BOOST_ASSERT(this->
hasMtu());
628 setFlagBit(
size_t bit,
bool value,
bool wantMask =
true);
639 std::bitset<CONTROL_PARAMETER_UBOUND> m_hasFields;
644 std::string m_localUri;
655 uint64_t m_defaultCongestionThreshold;
658 mutable Block m_wire;
664operator<<(std::ostream& os,
const ControlParameters& parameters);
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 the parameters for a ControlCommand.
Represents parameters in a ControlCommand request or response.
ControlParameters & setUri(const std::string &uri)
ControlParameters & unsetName()
ControlParameters & setCount(uint64_t count)
ControlParameters & setExpirationPeriod(const time::milliseconds &expirationPeriod)
uint64_t getFlags() const
ControlParameters & unsetOrigin()
void wireDecode(const Block &wire) final
ControlParameters & unsetCost()
ControlParameters & unsetStrategy()
ControlParameters & unsetFlags()
uint64_t getFaceId() const
const std::string & getUri() const
ControlParameters & setFacePersistency(FacePersistency persistency)
ControlParameters & setMask(uint64_t mask)
ControlParameters & unsetUri()
ControlParameters & unsetBaseCongestionMarkingInterval()
ControlParameters & unsetCapacity()
ControlParameters & unsetDefaultCongestionThreshold()
uint64_t getCapacity() const
Block wireEncode() const final
ControlParameters & unsetMtu()
ControlParameters & unsetLocalUri()
ControlParameters & unsetFlagBit(size_t bit)
Disable a bit in Mask.
uint64_t getDefaultCongestionThreshold() const
Get default congestion threshold (measured in bytes).
auto getPresentFields() const noexcept
bool hasExpirationPeriod() const
ControlParameters & unsetFaceId()
ControlParameters & unsetMask()
bool hasBaseCongestionMarkingInterval() const
const time::milliseconds & getExpirationPeriod() const
ControlParameters & setOrigin(RouteOrigin origin)
ControlParameters & setMtu(uint64_t mtu)
Set MTU (measured in bytes).
bool hasFacePersistency() const
ControlParameters & setName(const Name &name)
ControlParameters & unsetFacePersistency()
FacePersistency getFacePersistency() const
bool hasDefaultCongestionThreshold() const
const Name & getName() const
ControlParameters & setFaceId(uint64_t faceId)
ControlParameters & setFlagBit(size_t bit, bool value, bool wantMask=true)
Set a bit in Flags.
uint64_t getCount() const
ControlParameters & setCost(uint64_t cost)
ControlParameters & setCapacity(uint64_t capacity)
bool hasFlagBit(size_t bit) const
const Name & getStrategy() const
ControlParameters & setFlags(uint64_t flags)
ControlParameters & setBaseCongestionMarkingInterval(time::nanoseconds interval)
ControlParameters & setDefaultCongestionThreshold(uint64_t threshold)
Set default congestion threshold (measured in bytes).
ControlParameters & setLocalUri(const std::string &localUri)
const std::string & getLocalUri() const
ControlParameters & setStrategy(const Name &strategy)
ControlParameters & unsetCount()
bool getFlagBit(size_t bit) const
RouteOrigin getOrigin() const
time::nanoseconds getBaseCongestionMarkingInterval() const
ControlParameters & unsetExpirationPeriod()
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
Contains classes and functions related to the NFD Management protocol.
constexpr std::array CONTROL_PARAMETER_FIELD
std::ostream & operator<<(std::ostream &os, FaceScope faceScope)
::boost::chrono::milliseconds milliseconds
::boost::chrono::nanoseconds nanoseconds