NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: NDN, CCN, CCNx, content centric networks
API Documentation
face-status.cpp
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2013-2019 Regents of the University of California.
4  *
5  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
6  *
7  * ndn-cxx library is free software: you can redistribute it and/or modify it under the
8  * terms of the GNU Lesser General Public License as published by the Free Software
9  * Foundation, either version 3 of the License, or (at your option) any later version.
10  *
11  * ndn-cxx library is distributed in the hope that it will be useful, but WITHOUT ANY
12  * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
13  * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
14  *
15  * You should have received copies of the GNU General Public License and GNU Lesser
16  * General Public License along with ndn-cxx, e.g., in COPYING.md file. If not, see
17  * <http://www.gnu.org/licenses/>.
18  *
19  * See AUTHORS.md for complete list of ndn-cxx authors and contributors.
20  */
21 
28 
29 namespace ndn {
30 namespace nfd {
31 
32 BOOST_CONCEPT_ASSERT((StatusDatasetItem<FaceStatus>));
33 
35  : m_nInInterests(0)
36  , m_nInData(0)
37  , m_nInNacks(0)
38  , m_nOutInterests(0)
39  , m_nOutData(0)
40  , m_nOutNacks(0)
41  , m_nInBytes(0)
42  , m_nOutBytes(0)
43 {
44 }
45 
47 {
48  this->wireDecode(block);
49 }
50 
51 template<encoding::Tag TAG>
52 size_t
54 {
55  size_t totalLength = 0;
56 
57  totalLength += prependNonNegativeIntegerBlock(encoder, tlv::nfd::Flags, m_flags);
58  totalLength += prependNonNegativeIntegerBlock(encoder, tlv::nfd::NOutBytes, m_nOutBytes);
59  totalLength += prependNonNegativeIntegerBlock(encoder, tlv::nfd::NInBytes, m_nInBytes);
60  totalLength += prependNonNegativeIntegerBlock(encoder, tlv::nfd::NOutNacks, m_nOutNacks);
61  totalLength += prependNonNegativeIntegerBlock(encoder, tlv::nfd::NOutData, m_nOutData);
62  totalLength += prependNonNegativeIntegerBlock(encoder, tlv::nfd::NOutInterests, m_nOutInterests);
63  totalLength += prependNonNegativeIntegerBlock(encoder, tlv::nfd::NInNacks, m_nInNacks);
64  totalLength += prependNonNegativeIntegerBlock(encoder, tlv::nfd::NInData, m_nInData);
65  totalLength += prependNonNegativeIntegerBlock(encoder, tlv::nfd::NInInterests, m_nInInterests);
66  if (m_mtu) {
67  totalLength += prependNonNegativeIntegerBlock(encoder, tlv::nfd::Mtu, *m_mtu);
68  }
69  if (m_defaultCongestionThreshold) {
71  *m_defaultCongestionThreshold);
72  }
73  if (m_baseCongestionMarkingInterval) {
75  m_baseCongestionMarkingInterval->count());
76  }
80  if (m_expirationPeriod) {
82  m_expirationPeriod->count());
83  }
84  totalLength += prependStringBlock(encoder, tlv::nfd::LocalUri, m_localUri);
85  totalLength += prependStringBlock(encoder, tlv::nfd::Uri, m_remoteUri);
87 
88  totalLength += encoder.prependVarNumber(totalLength);
89  totalLength += encoder.prependVarNumber(tlv::nfd::FaceStatus);
90  return totalLength;
91 }
92 
94 
95 const Block&
97 {
98  if (m_wire.hasWire())
99  return m_wire;
100 
101  EncodingEstimator estimator;
102  size_t estimatedSize = wireEncode(estimator);
103 
104  EncodingBuffer buffer(estimatedSize, 0);
105  wireEncode(buffer);
106 
107  m_wire = buffer.block();
108  return m_wire;
109 }
110 
111 void
113 {
114  if (block.type() != tlv::nfd::FaceStatus) {
115  NDN_THROW(Error("FaceStatus", block.type()));
116  }
117 
118  m_wire = block;
119  m_wire.parse();
120  auto val = m_wire.elements_begin();
121 
122  if (val != m_wire.elements_end() && val->type() == tlv::nfd::FaceId) {
124  ++val;
125  }
126  else {
127  NDN_THROW(Error("missing required FaceId field"));
128  }
129 
130  if (val != m_wire.elements_end() && val->type() == tlv::nfd::Uri) {
131  m_remoteUri = readString(*val);
132  ++val;
133  }
134  else {
135  NDN_THROW(Error("missing required Uri field"));
136  }
137 
138  if (val != m_wire.elements_end() && val->type() == tlv::nfd::LocalUri) {
139  m_localUri = readString(*val);
140  ++val;
141  }
142  else {
143  NDN_THROW(Error("missing required LocalUri field"));
144  }
145 
146  if (val != m_wire.elements_end() && val->type() == tlv::nfd::ExpirationPeriod) {
147  m_expirationPeriod.emplace(readNonNegativeInteger(*val));
148  ++val;
149  }
150  else {
151  m_expirationPeriod = nullopt;
152  }
153 
154  if (val != m_wire.elements_end() && val->type() == tlv::nfd::FaceScope) {
155  m_faceScope = readNonNegativeIntegerAs<FaceScope>(*val);
156  ++val;
157  }
158  else {
159  NDN_THROW(Error("missing required FaceScope field"));
160  }
161 
162  if (val != m_wire.elements_end() && val->type() == tlv::nfd::FacePersistency) {
163  m_facePersistency = readNonNegativeIntegerAs<FacePersistency>(*val);
164  ++val;
165  }
166  else {
167  NDN_THROW(Error("missing required FacePersistency field"));
168  }
169 
170  if (val != m_wire.elements_end() && val->type() == tlv::nfd::LinkType) {
171  m_linkType = readNonNegativeIntegerAs<LinkType>(*val);
172  ++val;
173  }
174  else {
175  NDN_THROW(Error("missing required LinkType field"));
176  }
177 
178  if (val != m_wire.elements_end() && val->type() == tlv::nfd::BaseCongestionMarkingInterval) {
179  m_baseCongestionMarkingInterval.emplace(readNonNegativeInteger(*val));
180  ++val;
181  }
182  else {
183  m_baseCongestionMarkingInterval = nullopt;
184  }
185 
186  if (val != m_wire.elements_end() && val->type() == tlv::nfd::DefaultCongestionThreshold) {
187  m_defaultCongestionThreshold = readNonNegativeInteger(*val);
188  ++val;
189  }
190  else {
191  m_defaultCongestionThreshold = nullopt;
192  }
193 
194  if (val != m_wire.elements_end() && val->type() == tlv::nfd::Mtu) {
195  m_mtu = readNonNegativeInteger(*val);
196  ++val;
197  }
198  else {
199  m_mtu = nullopt;
200  }
201 
202  if (val != m_wire.elements_end() && val->type() == tlv::nfd::NInInterests) {
203  m_nInInterests = readNonNegativeInteger(*val);
204  ++val;
205  }
206  else {
207  NDN_THROW(Error("missing required NInInterests field"));
208  }
209 
210  if (val != m_wire.elements_end() && val->type() == tlv::nfd::NInData) {
211  m_nInData = readNonNegativeInteger(*val);
212  ++val;
213  }
214  else {
215  NDN_THROW(Error("missing required NInData field"));
216  }
217 
218  if (val != m_wire.elements_end() && val->type() == tlv::nfd::NInNacks) {
219  m_nInNacks = readNonNegativeInteger(*val);
220  ++val;
221  }
222  else {
223  NDN_THROW(Error("missing required NInNacks field"));
224  }
225 
226  if (val != m_wire.elements_end() && val->type() == tlv::nfd::NOutInterests) {
227  m_nOutInterests = readNonNegativeInteger(*val);
228  ++val;
229  }
230  else {
231  NDN_THROW(Error("missing required NOutInterests field"));
232  }
233 
234  if (val != m_wire.elements_end() && val->type() == tlv::nfd::NOutData) {
235  m_nOutData = readNonNegativeInteger(*val);
236  ++val;
237  }
238  else {
239  NDN_THROW(Error("missing required NOutData field"));
240  }
241 
242  if (val != m_wire.elements_end() && val->type() == tlv::nfd::NOutNacks) {
243  m_nOutNacks = readNonNegativeInteger(*val);
244  ++val;
245  }
246  else {
247  NDN_THROW(Error("missing required NOutNacks field"));
248  }
249 
250  if (val != m_wire.elements_end() && val->type() == tlv::nfd::NInBytes) {
251  m_nInBytes = readNonNegativeInteger(*val);
252  ++val;
253  }
254  else {
255  NDN_THROW(Error("missing required NInBytes field"));
256  }
257 
258  if (val != m_wire.elements_end() && val->type() == tlv::nfd::NOutBytes) {
259  m_nOutBytes = readNonNegativeInteger(*val);
260  ++val;
261  }
262  else {
263  NDN_THROW(Error("missing required NOutBytes field"));
264  }
265 
266  if (val != m_wire.elements_end() && val->type() == tlv::nfd::Flags) {
268  ++val;
269  }
270  else {
271  NDN_THROW(Error("missing required Flags field"));
272  }
273 }
274 
275 FaceStatus&
276 FaceStatus::setExpirationPeriod(time::milliseconds expirationPeriod)
277 {
278  m_wire.reset();
279  m_expirationPeriod = expirationPeriod;
280  return *this;
281 }
282 
283 FaceStatus&
285 {
286  m_wire.reset();
287  m_expirationPeriod = nullopt;
288  return *this;
289 }
290 
291 FaceStatus&
293 {
294  m_wire.reset();
295  m_baseCongestionMarkingInterval = interval;
296  return *this;
297 }
298 
299 FaceStatus&
301 {
302  m_wire.reset();
303  m_baseCongestionMarkingInterval = nullopt;
304  return *this;
305 }
306 
307 FaceStatus&
309 {
310  m_wire.reset();
311  m_defaultCongestionThreshold = threshold;
312  return *this;
313 }
314 
315 FaceStatus&
317 {
318  m_wire.reset();
319  m_defaultCongestionThreshold = nullopt;
320  return *this;
321 }
322 
323 FaceStatus&
324 FaceStatus::setMtu(uint64_t mtu)
325 {
326  m_wire.reset();
327  m_mtu = mtu;
328  return *this;
329 }
330 
331 FaceStatus&
333 {
334  m_wire.reset();
335  m_mtu = nullopt;
336  return *this;
337 }
338 
339 FaceStatus&
340 FaceStatus::setNInInterests(uint64_t nInInterests)
341 {
342  m_wire.reset();
343  m_nInInterests = nInInterests;
344  return *this;
345 }
346 
347 FaceStatus&
348 FaceStatus::setNInData(uint64_t nInData)
349 {
350  m_wire.reset();
351  m_nInData = nInData;
352  return *this;
353 }
354 
355 FaceStatus&
356 FaceStatus::setNInNacks(uint64_t nInNacks)
357 {
358  m_wire.reset();
359  m_nInNacks = nInNacks;
360  return *this;
361 }
362 
363 FaceStatus&
364 FaceStatus::setNOutInterests(uint64_t nOutInterests)
365 {
366  m_wire.reset();
367  m_nOutInterests = nOutInterests;
368  return *this;
369 }
370 
371 FaceStatus&
372 FaceStatus::setNOutData(uint64_t nOutData)
373 {
374  m_wire.reset();
375  m_nOutData = nOutData;
376  return *this;
377 }
378 
379 FaceStatus&
380 FaceStatus::setNOutNacks(uint64_t nOutNacks)
381 {
382  m_wire.reset();
383  m_nOutNacks = nOutNacks;
384  return *this;
385 }
386 
387 FaceStatus&
388 FaceStatus::setNInBytes(uint64_t nInBytes)
389 {
390  m_wire.reset();
391  m_nInBytes = nInBytes;
392  return *this;
393 }
394 
395 FaceStatus&
396 FaceStatus::setNOutBytes(uint64_t nOutBytes)
397 {
398  m_wire.reset();
399  m_nOutBytes = nOutBytes;
400  return *this;
401 }
402 
403 bool
404 operator==(const FaceStatus& a, const FaceStatus& b)
405 {
406  return a.getFaceId() == b.getFaceId() &&
407  a.getRemoteUri() == b.getRemoteUri() &&
408  a.getLocalUri() == b.getLocalUri() &&
409  a.getFaceScope() == b.getFaceScope() &&
411  a.getLinkType() == b.getLinkType() &&
412  a.getFlags() == b.getFlags() &&
421  a.hasMtu() == b.hasMtu() &&
422  (!a.hasMtu() || a.getMtu() == b.getMtu()) &&
423  a.getNInInterests() == b.getNInInterests() &&
424  a.getNInData() == b.getNInData() &&
425  a.getNInNacks() == b.getNInNacks() &&
426  a.getNOutInterests() == b.getNOutInterests() &&
427  a.getNOutData() == b.getNOutData() &&
428  a.getNOutNacks() == b.getNOutNacks() &&
429  a.getNInBytes() == b.getNInBytes() &&
430  a.getNOutBytes() == b.getNOutBytes();
431 }
432 
433 std::ostream&
434 operator<<(std::ostream& os, const FaceStatus& status)
435 {
436  os << "Face(FaceId: " << status.getFaceId() << ",\n"
437  << " RemoteUri: " << status.getRemoteUri() << ",\n"
438  << " LocalUri: " << status.getLocalUri() << ",\n";
439 
440  if (status.hasExpirationPeriod()) {
441  os << " ExpirationPeriod: " << status.getExpirationPeriod() << ",\n";
442  }
443  else {
444  os << " ExpirationPeriod: infinite,\n";
445  }
446 
447  os << " FaceScope: " << status.getFaceScope() << ",\n"
448  << " FacePersistency: " << status.getFacePersistency() << ",\n"
449  << " LinkType: " << status.getLinkType() << ",\n";
450 
451  if (status.hasBaseCongestionMarkingInterval()) {
452  os << " BaseCongestionMarkingInterval: " << status.getBaseCongestionMarkingInterval() << ",\n";
453  }
454 
455  if (status.hasDefaultCongestionThreshold()) {
456  os << " DefaultCongestionThreshold: " << status.getDefaultCongestionThreshold() << " bytes,\n";
457  }
458 
459  if (status.hasMtu()) {
460  os << " Mtu: " << status.getMtu() << " bytes,\n";
461  }
462 
463  os << " Flags: " << AsHex{status.getFlags()} << ",\n"
464  << " Counters: {Interests: {in: " << status.getNInInterests() << ", "
465  << "out: " << status.getNOutInterests() << "},\n"
466  << " Data: {in: " << status.getNInData() << ", "
467  << "out: " << status.getNOutData() << "},\n"
468  << " Nacks: {in: " << status.getNInNacks() << ", "
469  << "out: " << status.getNOutNacks() << "},\n"
470  << " bytes: {in: " << status.getNInBytes() << ", "
471  << "out: " << status.getNOutBytes() << "}}\n";
472 
473  return os << " )";
474 }
475 
476 } // namespace nfd
477 } // namespace ndn
ndn::nfd::FaceStatus::getNInData
uint64_t getNInData() const
Definition: face-status.hpp:159
ndn::nfd::FaceStatus::setNInNacks
FaceStatus & setNInNacks(uint64_t nInNacks)
Definition: face-status.cpp:356
ndn::nfd::FaceTraits::getFaceScope
FaceScope getFaceScope() const
Definition: face-traits.hpp:89
ndn::tlv::nfd::FaceStatus
@ FaceStatus
Definition: tlv-nfd.hpp:63
ndn::nfd::FaceTraits::getRemoteUri
const std::string & getRemoteUri() const
Definition: face-traits.hpp:61
ndn::nfd::FaceStatus::hasExpirationPeriod
bool hasExpirationPeriod() const
Definition: face-status.hpp:62
ndn::nfd::FaceTraits< FaceStatus >::m_remoteUri
std::string m_remoteUri
Definition: face-traits.hpp:184
string-helper.hpp
ndn::tlv::nfd::LinkType
@ LinkType
Definition: tlv-nfd.hpp:69
ndn::nfd::FaceStatus::setNOutData
FaceStatus & setNOutData(uint64_t nOutData)
Definition: face-status.cpp:372
face-status.hpp
ndn::nfd::FaceStatus::getNInNacks
uint64_t getNInNacks() const
Definition: face-status.hpp:168
ndn::tlv::nfd::FaceId
@ FaceId
Definition: tlv-nfd.hpp:36
ndn::nfd::FaceStatus::getNInBytes
uint64_t getNInBytes() const
Definition: face-status.hpp:204
ndn::nfd::operator<<
std::ostream & operator<<(std::ostream &os, FaceScope faceScope)
Definition: nfd-constants.cpp:36
ndn::AsHex
Helper class to convert a number to hexadecimal format, for use with stream insertion operators.
Definition: string-helper.hpp:49
ndn::Block::elements_begin
element_const_iterator elements_begin() const
Equivalent to elements().begin()
Definition: block.hpp:399
ndn::nfd::FaceStatus::getNOutInterests
uint64_t getNOutInterests() const
Definition: face-status.hpp:177
ndn::nfd::FaceStatus::getNOutBytes
uint64_t getNOutBytes() const
Definition: face-status.hpp:213
ndn::nfd::FaceTraits< FaceStatus >::m_faceId
uint64_t m_faceId
Definition: face-traits.hpp:183
ndn::tlv::nfd::NOutInterests
@ NOutInterests
Definition: tlv-nfd.hpp:81
ndn::nfd::FaceStatus::setNInBytes
FaceStatus & setNInBytes(uint64_t nInBytes)
Definition: face-status.cpp:388
ndn::encoding::readString
std::string readString(const Block &block)
Read TLV-VALUE of a TLV element as a string.
Definition: block-helpers.cpp:122
ndn::nfd::FaceStatus::setDefaultCongestionThreshold
FaceStatus & setDefaultCongestionThreshold(uint64_t threshold)
set default congestion threshold (measured in bytes)
Definition: face-status.cpp:308
ndn::nfd::FaceStatus::unsetDefaultCongestionThreshold
FaceStatus & unsetDefaultCongestionThreshold()
Definition: face-status.cpp:316
ndn::nfd::FaceTraits::getFlags
uint64_t getFlags() const
Definition: face-traits.hpp:131
concepts.hpp
ndn::nfd::FaceStatus::hasDefaultCongestionThreshold
bool hasDefaultCongestionThreshold() const
Definition: face-status.hpp:100
ndn::Block::reset
void reset() noexcept
Reset the Block to a default-constructed state.
Definition: block.cpp:250
ndn::tlv::nfd::NInData
@ NInData
Definition: tlv-nfd.hpp:79
ndn::nfd::FaceTraits::getFaceId
uint64_t getFaceId() const
Definition: face-traits.hpp:47
ndn::encoding::EncodingEstimator
EncodingImpl< EstimatorTag > EncodingEstimator
Definition: encoding-buffer-fwd.hpp:39
ndn::encoding::readNonNegativeInteger
uint64_t readNonNegativeInteger(const Block &block)
Read a non-negative integer from a TLV element.
Definition: block-helpers.cpp:64
ndn::nfd::FaceStatus::setExpirationPeriod
FaceStatus & setExpirationPeriod(time::milliseconds expirationPeriod)
Definition: face-status.cpp:276
nfd
Copyright (c) 2011-2015 Regents of the University of California.
Definition: ndn-common.hpp:40
ndn::tlv::nfd::Mtu
@ Mtu
Definition: tlv-nfd.hpp:72
ndn::Block::type
uint32_t type() const
Return the TLV-TYPE of the Block.
Definition: block.hpp:274
ndn::nfd::FaceTraits::getLocalUri
const std::string & getLocalUri() const
Definition: face-traits.hpp:75
ndn::nfd::FaceTraits< FaceStatus >::m_linkType
LinkType m_linkType
Definition: face-traits.hpp:188
ndn::tlv::nfd::Uri
@ Uri
Definition: tlv-nfd.hpp:37
ndn::nfd::FaceStatus::getDefaultCongestionThreshold
uint64_t getDefaultCongestionThreshold() const
get default congestion threshold (measured in bytes)
Definition: face-status.hpp:108
ndn::nfd::FaceTraits< FaceStatus >::m_faceScope
FaceScope m_faceScope
Definition: face-traits.hpp:186
ndn::nfd::FaceTraits< FaceStatus >::m_localUri
std::string m_localUri
Definition: face-traits.hpp:185
ndn::nfd::FaceStatus::wireDecode
void wireDecode(const Block &wire)
decode FaceStatus
Definition: face-status.cpp:112
ndn::nfd::FaceStatus::getMtu
uint64_t getMtu() const
get MTU (measured in bytes)
Definition: face-status.hpp:133
ndn::nfd::FaceStatus::setNInInterests
FaceStatus & setNInInterests(uint64_t nInInterests)
Definition: face-status.cpp:340
NDN_THROW
#define NDN_THROW(e)
Definition: exception.hpp:61
ndn::nfd::FaceTraits< FaceStatus >::m_wire
Block m_wire
Definition: face-traits.hpp:191
ndn::tlv::nfd::NInBytes
@ NInBytes
Definition: tlv-nfd.hpp:84
ndn::nfd::FaceStatus::setBaseCongestionMarkingInterval
FaceStatus & setBaseCongestionMarkingInterval(time::nanoseconds interval)
Definition: face-status.cpp:292
nonstd::optional_lite::nullopt
const nullopt_t nullopt((nullopt_t::init()))
ndn::nfd::FaceStatus::getExpirationPeriod
time::milliseconds getExpirationPeriod() const
Definition: face-status.hpp:68
ndn::tlv::nfd::NInInterests
@ NInInterests
Definition: tlv-nfd.hpp:78
ndn::nfd::FaceStatus::hasBaseCongestionMarkingInterval
bool hasBaseCongestionMarkingInterval() const
Definition: face-status.hpp:81
ndn::nfd::FaceStatus::getNOutNacks
uint64_t getNOutNacks() const
Definition: face-status.hpp:195
ndn::nfd::FaceTraits< FaceStatus >::m_facePersistency
FacePersistency m_facePersistency
Definition: face-traits.hpp:187
ndn::nfd::FaceStatus::unsetMtu
FaceStatus & unsetMtu()
Definition: face-status.cpp:332
ndn::tlv::nfd::ExpirationPeriod
@ ExpirationPeriod
Definition: tlv-nfd.hpp:45
ndn::Block::parse
void parse() const
Parse TLV-VALUE into sub-elements.
Definition: block.cpp:325
ndn::nfd::FaceStatus::getNOutData
uint64_t getNOutData() const
Definition: face-status.hpp:186
ndn::encoding::prependNonNegativeIntegerBlock
size_t prependNonNegativeIntegerBlock(EncodingImpl< TAG > &encoder, uint32_t type, uint64_t value)
Prepend a TLV element containing a non-negative integer.
Definition: block-helpers.cpp:35
ndn::nfd::FaceStatus::setNOutInterests
FaceStatus & setNOutInterests(uint64_t nOutInterests)
Definition: face-status.cpp:364
ndn::nfd::FaceStatus
represents an item in NFD Face dataset
Definition: face-status.hpp:37
ndn::nfd::FaceStatus::getBaseCongestionMarkingInterval
time::nanoseconds getBaseCongestionMarkingInterval() const
Definition: face-status.hpp:87
ndn::encoding::EncodingImpl
Definition: encoding-buffer-fwd.hpp:36
tlv-nfd.hpp
ndn::tlv::nfd::NOutData
@ NOutData
Definition: tlv-nfd.hpp:82
block-helpers.hpp
ndn::nfd::FaceStatus::getNInInterests
uint64_t getNInInterests() const
Definition: face-status.hpp:150
ndn::nfd::FaceStatus::wireEncode
const Block & wireEncode() const
encode FaceStatus
Definition: face-status.cpp:96
ndn::nfd::FaceTraits< FaceStatus >::m_flags
uint64_t m_flags
Definition: face-traits.hpp:189
ndn::tlv::nfd::FacePersistency
@ FacePersistency
Definition: tlv-nfd.hpp:68
ndn::Block
Represents a TLV element of NDN packet format.
Definition: block.hpp:43
ndn::Block::elements_end
element_const_iterator elements_end() const
Equivalent to elements().end()
Definition: block.hpp:407
ndn::tlv::nfd::DefaultCongestionThreshold
@ DefaultCongestionThreshold
Definition: tlv-nfd.hpp:71
ndn::nfd::FaceStatus::unsetBaseCongestionMarkingInterval
FaceStatus & unsetBaseCongestionMarkingInterval()
Definition: face-status.cpp:300
ndn::nfd::FaceTraits::getFacePersistency
FacePersistency getFacePersistency() const
Definition: face-traits.hpp:103
ndn::tlv::nfd::BaseCongestionMarkingInterval
@ BaseCongestionMarkingInterval
Definition: tlv-nfd.hpp:70
ndn::Block::hasWire
bool hasWire() const noexcept
Check if the Block contains a fully encoded wire representation.
Definition: block.hpp:230
ndn::tlv::nfd::LocalUri
@ LocalUri
Definition: tlv-nfd.hpp:64
ndn::tlv::nfd::FaceScope
@ FaceScope
Definition: tlv-nfd.hpp:67
ndn::nfd::FaceStatus::unsetExpirationPeriod
FaceStatus & unsetExpirationPeriod()
Definition: face-status.cpp:284
ndn::nfd::FaceStatus::setMtu
FaceStatus & setMtu(uint64_t mtu)
set MTU (measured in bytes)
Definition: face-status.cpp:324
ndn::tlv::nfd::NInNacks
@ NInNacks
Definition: tlv-nfd.hpp:80
ndn::nfd::operator==
bool operator==(const ChannelStatus &a, const ChannelStatus &b)
Definition: channel-status.cpp:97
ndn::encoding::prependStringBlock
size_t prependStringBlock(EncodingImpl< TAG > &encoder, uint32_t type, const std::string &value)
Prepend a TLV element containing a string.
Definition: block-helpers.cpp:104
ndn::nfd::FaceStatus::setNInData
FaceStatus & setNInData(uint64_t nInData)
Definition: face-status.cpp:348
ndn::nfd::FaceStatus::hasMtu
bool hasMtu() const
Definition: face-status.hpp:123
ndn::nfd::FaceTraits::getLinkType
LinkType getLinkType() const
Definition: face-traits.hpp:117
ndn::StatusDatasetItem
concept check for an item in a Status Dataset
Definition: concepts.hpp:116
ndn::nfd::NDN_CXX_DEFINE_WIRE_ENCODE_INSTANTIATIONS
NDN_CXX_DEFINE_WIRE_ENCODE_INSTANTIATIONS(ChannelStatus)
ndn::nfd::FaceStatus::FaceStatus
FaceStatus()
Definition: face-status.cpp:34
ndn::tlv::nfd::NOutNacks
@ NOutNacks
Definition: tlv-nfd.hpp:83
encoding-buffer.hpp
ndn::nfd::FaceStatus::setNOutBytes
FaceStatus & setNOutBytes(uint64_t nOutBytes)
Definition: face-status.cpp:396
ndn::tlv::nfd::Flags
@ Flags
Definition: tlv-nfd.hpp:42
ndn
Copyright (c) 2011-2015 Regents of the University of California.
Definition: ndn-strategy-choice-helper.hpp:34
ndn::encoding::EncodingBuffer
EncodingImpl< EncoderTag > EncodingBuffer
Definition: encoding-buffer-fwd.hpp:38
ndn::tlv::nfd::NOutBytes
@ NOutBytes
Definition: tlv-nfd.hpp:85
ndn::nfd::FaceStatus::setNOutNacks
FaceStatus & setNOutNacks(uint64_t nOutNacks)
Definition: face-status.cpp:380