|
NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: NDN, CCN, CCNx, content centric networks
|
API Documentation
|
Go to the documentation of this file.
51 template<encoding::Tag TAG>
55 size_t totalLength = 0;
69 if (m_defaultCongestionThreshold) {
71 *m_defaultCongestionThreshold);
73 if (m_baseCongestionMarkingInterval) {
75 m_baseCongestionMarkingInterval->count());
80 if (m_expirationPeriod) {
82 m_expirationPeriod->count());
88 totalLength += encoder.prependVarNumber(totalLength);
127 NDN_THROW(Error(
"missing required FaceId field"));
135 NDN_THROW(Error(
"missing required Uri field"));
143 NDN_THROW(Error(
"missing required LocalUri field"));
155 m_faceScope = readNonNegativeIntegerAs<FaceScope>(*val);
159 NDN_THROW(Error(
"missing required FaceScope field"));
167 NDN_THROW(Error(
"missing required FacePersistency field"));
171 m_linkType = readNonNegativeIntegerAs<LinkType>(*val);
175 NDN_THROW(Error(
"missing required LinkType field"));
183 m_baseCongestionMarkingInterval =
nullopt;
191 m_defaultCongestionThreshold =
nullopt;
207 NDN_THROW(Error(
"missing required NInInterests field"));
215 NDN_THROW(Error(
"missing required NInData field"));
223 NDN_THROW(Error(
"missing required NInNacks field"));
231 NDN_THROW(Error(
"missing required NOutInterests field"));
239 NDN_THROW(Error(
"missing required NOutData field"));
247 NDN_THROW(Error(
"missing required NOutNacks field"));
255 NDN_THROW(Error(
"missing required NInBytes field"));
263 NDN_THROW(Error(
"missing required NOutBytes field"));
271 NDN_THROW(Error(
"missing required Flags field"));
279 m_expirationPeriod = expirationPeriod;
295 m_baseCongestionMarkingInterval = interval;
303 m_baseCongestionMarkingInterval =
nullopt;
311 m_defaultCongestionThreshold = threshold;
319 m_defaultCongestionThreshold =
nullopt;
343 m_nInInterests = nInInterests;
359 m_nInNacks = nInNacks;
367 m_nOutInterests = nOutInterests;
375 m_nOutData = nOutData;
383 m_nOutNacks = nOutNacks;
391 m_nInBytes = nInBytes;
399 m_nOutBytes = nOutBytes;
436 os <<
"Face(FaceId: " << status.
getFaceId() <<
",\n"
444 os <<
" ExpirationPeriod: infinite,\n";
460 os <<
" Mtu: " << status.
getMtu() <<
" bytes,\n";
466 <<
" Data: {in: " << status.
getNInData() <<
", "
uint64_t getNInData() const
FaceStatus & setNInNacks(uint64_t nInNacks)
FaceScope getFaceScope() const
const std::string & getRemoteUri() const
bool hasExpirationPeriod() const
FaceStatus & setNOutData(uint64_t nOutData)
uint64_t getNInNacks() const
uint64_t getNInBytes() const
std::ostream & operator<<(std::ostream &os, FaceScope faceScope)
Helper class to convert a number to hexadecimal format, for use with stream insertion operators.
element_const_iterator elements_begin() const
Equivalent to elements().begin()
uint64_t getNOutInterests() const
uint64_t getNOutBytes() const
FaceStatus & setNInBytes(uint64_t nInBytes)
std::string readString(const Block &block)
Read TLV-VALUE of a TLV element as a string.
FaceStatus & setDefaultCongestionThreshold(uint64_t threshold)
set default congestion threshold (measured in bytes)
FaceStatus & unsetDefaultCongestionThreshold()
uint64_t getFlags() const
bool hasDefaultCongestionThreshold() const
void reset() noexcept
Reset the Block to a default-constructed state.
uint64_t getFaceId() const
EncodingImpl< EstimatorTag > EncodingEstimator
uint64_t readNonNegativeInteger(const Block &block)
Read a non-negative integer from a TLV element.
FaceStatus & setExpirationPeriod(time::milliseconds expirationPeriod)
Copyright (c) 2011-2015 Regents of the University of California.
uint32_t type() const
Return the TLV-TYPE of the Block.
const std::string & getLocalUri() const
uint64_t getDefaultCongestionThreshold() const
get default congestion threshold (measured in bytes)
void wireDecode(const Block &wire)
decode FaceStatus
uint64_t getMtu() const
get MTU (measured in bytes)
FaceStatus & setNInInterests(uint64_t nInInterests)
FaceStatus & setBaseCongestionMarkingInterval(time::nanoseconds interval)
const nullopt_t nullopt((nullopt_t::init()))
time::milliseconds getExpirationPeriod() const
bool hasBaseCongestionMarkingInterval() const
uint64_t getNOutNacks() const
FacePersistency m_facePersistency
void parse() const
Parse TLV-VALUE into sub-elements.
uint64_t getNOutData() const
size_t prependNonNegativeIntegerBlock(EncodingImpl< TAG > &encoder, uint32_t type, uint64_t value)
Prepend a TLV element containing a non-negative integer.
FaceStatus & setNOutInterests(uint64_t nOutInterests)
represents an item in NFD Face dataset
time::nanoseconds getBaseCongestionMarkingInterval() const
uint64_t getNInInterests() const
const Block & wireEncode() const
encode FaceStatus
Represents a TLV element of NDN packet format.
element_const_iterator elements_end() const
Equivalent to elements().end()
@ DefaultCongestionThreshold
FaceStatus & unsetBaseCongestionMarkingInterval()
FacePersistency getFacePersistency() const
@ BaseCongestionMarkingInterval
bool hasWire() const noexcept
Check if the Block contains a fully encoded wire representation.
FaceStatus & unsetExpirationPeriod()
FaceStatus & setMtu(uint64_t mtu)
set MTU (measured in bytes)
bool operator==(const ChannelStatus &a, const ChannelStatus &b)
size_t prependStringBlock(EncodingImpl< TAG > &encoder, uint32_t type, const std::string &value)
Prepend a TLV element containing a string.
FaceStatus & setNInData(uint64_t nInData)
LinkType getLinkType() const
concept check for an item in a Status Dataset
NDN_CXX_DEFINE_WIRE_ENCODE_INSTANTIATIONS(ChannelStatus)
FaceStatus & setNOutBytes(uint64_t nOutBytes)
Copyright (c) 2011-2015 Regents of the University of California.
EncodingImpl< EncoderTag > EncodingBuffer
FaceStatus & setNOutNacks(uint64_t nOutNacks)