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
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
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 "
core/logger.hpp
"
27
#include "
fw/face-table.hpp
"
28
#include <boost/range/adaptor/reversed.hpp>
29
30
#include <ndn-cxx/management/nfd-face-status.hpp>
31
32
namespace
nfd {
33
34
NFD_LOG_INIT
(
"FaceStatusPublisher"
);
35
36
37
FaceStatusPublisher::FaceStatusPublisher
(
const
FaceTable
& faceTable,
38
AppFace
& face,
39
const
Name
& prefix,
40
ndn::KeyChain& keyChain)
41
:
SegmentPublisher
(face, prefix, keyChain)
42
, m_faceTable(faceTable)
43
{
44
45
}
46
47
48
FaceStatusPublisher::~FaceStatusPublisher
()
49
{
50
51
}
52
53
size_t
54
FaceStatusPublisher::generate
(ndn::EncodingBuffer& outBuffer)
55
{
56
size_t
totalLength = 0;
57
58
for
(
const
shared_ptr<Face>& face : m_faceTable | boost::adaptors::reversed) {
59
ndn::nfd::FaceStatus status = face->getFaceStatus();
60
totalLength += status.wireEncode(outBuffer);
61
}
62
return
totalLength;
63
}
64
65
}
// 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
logger.hpp
nfd::FaceStatusPublisher::~FaceStatusPublisher
virtual ~FaceStatusPublisher()
Definition:
face-status-publisher.cpp:48
nfd::FaceTable
container of all Faces
Definition:
face-table.hpp:38
ns3::ndn::Name
Name
Definition:
ndn-common.cpp:25
nfd::FaceStatusPublisher::generate
virtual size_t generate(ndn::EncodingBuffer &outBuffer)
In a derived class, write the octets into outBuffer.
Definition:
face-status-publisher.cpp:54
nfd::FaceStatusPublisher::FaceStatusPublisher
FaceStatusPublisher(const FaceTable &faceTable, AppFace &face, const Name &prefix, ndn::KeyChain &keyChain)
Definition:
face-status-publisher.cpp:37
NFD_LOG_INIT
#define NFD_LOG_INIT(name)
Definition:
logger.hpp:33
face-table.hpp
ndnSIM
NFD
daemon
mgmt
face-status-publisher.cpp
Generated on Wed Feb 18 2015 16:31:16 for ndnSIM by
1.8.7