NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.0: NDN, CCN, CCNx, content centric networks
API Documentation
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
face-status-publisher.cpp
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
25
#include "
face-status-publisher.hpp
"
26
#include "
fw/face-table.hpp
"
27
28
#include <boost/range/adaptor/reversed.hpp>
29
#include <ndn-cxx/management/nfd-face-status.hpp>
30
31
namespace
nfd
{
32
33
FaceStatusPublisher::FaceStatusPublisher
(
const
FaceTable
& faceTable,
34
AppFace
& face,
35
const
Name
& prefix,
36
ndn::KeyChain& keyChain)
37
:
SegmentPublisher
(face, prefix, keyChain)
38
, m_faceTable(faceTable)
39
{
40
}
41
42
FaceStatusPublisher::~FaceStatusPublisher
()
43
{
44
}
45
46
size_t
47
FaceStatusPublisher::generate
(
ndn::EncodingBuffer
& outBuffer)
48
{
49
size_t
totalLength = 0;
50
51
for
(
const
shared_ptr<Face>& face : m_faceTable | boost::adaptors::reversed) {
52
ndn::nfd::FaceStatus
status = face->getFaceStatus();
53
totalLength += status.
wireEncode
(outBuffer);
54
}
55
return
totalLength;
56
}
57
58
}
// namespace nfd
nfd::SegmentPublisher
provides a publisher of Status Dataset or other segmented octet stream
Definition:
segment-publisher.hpp:40
nfd::AppFace
Definition:
app-face.hpp:37
face-status-publisher.hpp
ndn::nfd::FaceStatus::wireEncode
size_t wireEncode(EncodingImpl< TAG > &encoder) const
prepend FaceStatus to the encoder
Definition:
nfd-face-status.cpp:54
nfd::FaceStatusPublisher::~FaceStatusPublisher
virtual ~FaceStatusPublisher()
Definition:
face-status-publisher.cpp:42
nfd::FaceTable
container of all Faces
Definition:
face-table.hpp:38
ndn::encoding::EncodingBuffer
EncodingImpl< EncoderTag > EncodingBuffer
Definition:
encoding-buffer-fwd.hpp:45
nfd
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-common.hpp:38
nfd::FaceStatusPublisher::generate
virtual size_t generate(ndn::EncodingBuffer &outBuffer)
In a derived class, write the octets into outBuffer.
Definition:
face-status-publisher.cpp:47
nfd::FaceStatusPublisher::FaceStatusPublisher
FaceStatusPublisher(const FaceTable &faceTable, AppFace &face, const Name &prefix, ndn::KeyChain &keyChain)
Definition:
face-status-publisher.cpp:33
ndn::nfd::FaceStatus
represents Face status
Definition:
nfd-face-status.hpp:37
ndn::Name
Name abstraction to represent an absolute name.
Definition:
name.hpp:46
face-table.hpp
ndnSIM
NFD
daemon
mgmt
face-status-publisher.cpp
Generated on Tue Feb 23 2016 22:18:44 for ndnSIM by
1.8.11