22 #ifndef NDN_CXX_MGMT_NFD_CONTROL_PARAMETERS_HPP
23 #define NDN_CXX_MGMT_NFD_CONTROL_PARAMETERS_HPP
69 "BaseCongestionMarkingInterval"sv,
70 "DefaultCongestionThreshold"sv,
94 template<encoding::Tag TAG>
174 BOOST_ASSERT(this->
hasUri());
212 m_localUri = localUri;
302 m_capacity = capacity;
422 m_strategy = strategy;
445 return m_expirationPeriod;
452 m_expirationPeriod = expirationPeriod;
475 return m_facePersistency;
482 m_facePersistency = persistency;
505 return m_baseCongestionMarkingInterval;
512 m_baseCongestionMarkingInterval = interval;
537 return m_defaultCongestionThreshold;
546 m_defaultCongestionThreshold = threshold;
572 BOOST_ASSERT(this->
hasMtu());
597 const std::vector<bool>&
625 setFlagBit(
size_t bit,
bool value,
bool wantMask =
true);
636 std::vector<bool> m_hasFields;
641 std::string m_localUri;
652 uint64_t m_defaultCongestionThreshold;
656 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
Contains classes and functions related to the NFD Management protocol.
constexpr std::string_view CONTROL_PARAMETER_FIELD[CONTROL_PARAMETER_UBOUND]
std::ostream & operator<<(std::ostream &os, FaceScope faceScope)
::boost::chrono::milliseconds milliseconds
::boost::chrono::nanoseconds nanoseconds