NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: NDN, CCN, CCNx, content centric networks
API Documentation
strategy-choice-publisher.cpp
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
26
#include "
strategy-choice-publisher.hpp
"
27
#include "
table/strategy-choice.hpp
"
28
29
#include <ndn-cxx/management/nfd-strategy-choice.hpp>
30
31
namespace
nfd
{
32
33
StrategyChoicePublisher::StrategyChoicePublisher
(
const
StrategyChoice
& strategyChoice,
34
AppFace
& face,
35
const
Name
& prefix,
36
ndn::KeyChain
& keyChain)
37
:
SegmentPublisher
(face, prefix, keyChain)
38
, m_strategyChoice(strategyChoice)
39
{
40
}
41
42
StrategyChoicePublisher::~StrategyChoicePublisher
()
43
{
44
}
45
46
size_t
47
StrategyChoicePublisher::generate
(
ndn::EncodingBuffer
& outBuffer)
48
{
49
size_t
totalLength = 0;
50
51
for
(
StrategyChoice::const_iterator
i = m_strategyChoice.
begin
();
52
i != m_strategyChoice.
end
();
53
++i)
54
{
55
ndn::nfd::StrategyChoice
entry;
56
57
entry.
setName
(i->getPrefix())
58
.setStrategy(i->getStrategyName());
59
60
totalLength += entry.
wireEncode
(outBuffer);
61
}
62
63
return
totalLength;
64
}
65
66
}
// 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
nfd::StrategyChoice
represents the Strategy Choice table
Definition:
strategy-choice.hpp:45
ndn::security::KeyChain
The packet signing interface.
Definition:
key-chain.hpp:48
nfd::StrategyChoicePublisher::generate
virtual size_t generate(ndn::EncodingBuffer &outBuffer)
In a derived class, write the octets into outBuffer.
Definition:
strategy-choice-publisher.cpp:47
strategy-choice.hpp
nfd::StrategyChoicePublisher::StrategyChoicePublisher
StrategyChoicePublisher(const StrategyChoice &strategyChoice, AppFace &face, const Name &prefix, ndn::KeyChain &keyChain)
Definition:
strategy-choice-publisher.cpp:33
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:40
nfd::StrategyChoicePublisher::~StrategyChoicePublisher
virtual ~StrategyChoicePublisher()
Definition:
strategy-choice-publisher.cpp:42
ndn::nfd::StrategyChoice::wireEncode
size_t wireEncode(EncodingImpl< TAG > &encoder) const
Definition:
nfd-strategy-choice.cpp:47
nfd::StrategyChoice::end
const_iterator end() const
Definition:
strategy-choice.hpp:179
ndn::Name
Name abstraction to represent an absolute name.
Definition:
name.hpp:46
nfd::StrategyChoice::begin
const_iterator begin() const
Definition:
strategy-choice.cpp:278
strategy-choice-publisher.hpp
ndn::nfd::StrategyChoice
represents NFD StrategyChoice dataset
Definition:
nfd-strategy-choice.hpp:36
nfd::StrategyChoice::const_iterator
Definition:
strategy-choice.hpp:105
ndn::nfd::StrategyChoice::setName
StrategyChoice & setName(const Name &name)
Definition:
nfd-strategy-choice.cpp:115
ndnSIM
NFD
daemon
mgmt
strategy-choice-publisher.cpp
Generated on Fri Feb 23 2018 12:30:55 for ndnSIM by
1.8.14