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" 55 "LocalControlFeature",
98 template<encoding::Tag TAG>
178 BOOST_ASSERT(this->
hasUri());
215 return m_localControlFeature;
225 m_localControlFeature = localControlFeature;
378 m_strategy = strategy;
397 const time::milliseconds&
401 return m_expirationPeriod;
408 m_expirationPeriod = expirationPeriod;
431 return m_facePersistency;
438 m_facePersistency = persistency;
451 const std::vector<bool>&
479 setFlagBit(
size_t bit,
bool value,
bool wantMask =
true);
490 std::vector<bool> m_hasFields;
501 time::milliseconds m_expirationPeriod;
505 mutable Block m_wire;
514 #endif // NDN_MGMT_NFD_CONTROL_PARAMETERS_HPP
uint64_t getFlags() const
ControlParameters & setFaceId(uint64_t faceId)
virtual void wireDecode(const Block &wire) final
Copyright (c) 2011-2015 Regents of the University of California.
bool hasLocalControlFeature() const
ControlParameters & unsetStrategy()
represents parameters in a ControlCommand request or response
ControlParameters & setFlags(uint64_t flags)
ControlParameters & unsetFaceId()
ControlParameters & unsetMask()
Class representing a wire element of NDN-TLV packet format.
ControlParameters & unsetCost()
Error(const std::string &what)
ControlParameters & unsetFlags()
ControlParameters & setUri(const std::string &uri)
ControlParameters & unsetOrigin()
ControlParameters & setStrategy(const Name &strategy)
ControlParameters & setExpirationPeriod(const time::milliseconds &expirationPeriod)
uint64_t getOrigin() const
ControlParameters & unsetFlagBit(size_t bit)
disable a bit in Mask
FacePersistency getFacePersistency() const
ControlParameters & setLocalControlFeature(LocalControlFeature localControlFeature)
const Name & getName() const
virtual Block wireEncode() const final
Copyright (c) 2011-2015 Regents of the University of California.
ControlParameters & unsetExpirationPeriod()
ControlParameters & unsetFacePersistency()
bool hasExpirationPeriod() const
std::ostream & operator<<(std::ostream &os, FaceScope faceScope)
Name abstraction to represent 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 & setCost(uint64_t cost)
bool hasFacePersistency() const
const time::milliseconds & getExpirationPeriod() const
ControlParameters & setOrigin(uint64_t origin)
ControlParameters & setName(const Name &name)
ControlParameters & setFacePersistency(FacePersistency persistency)
bool getFlagBit(size_t bit) const
ControlParameters & unsetName()
ControlParameters & unsetUri()
LocalControlFeature getLocalControlFeature() const
const Name & getStrategy() const
ControlParameters & setMask(uint64_t mask)
ControlParameters & setFlagBit(size_t bit, bool value, bool wantMask=true)
set a bit in Flags
represents an error in TLV encoding or decoding
ControlParameters & unsetLocalControlFeature()