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; -*- */
28 
29 #include <ndn-cxx/management/nfd-strategy-choice.hpp>
30 
31 namespace nfd {
32 
34  AppFace& face,
35  const Name& prefix,
36  ndn::KeyChain& keyChain)
37  : SegmentPublisher(face, prefix, keyChain)
38  , m_strategyChoice(strategyChoice)
39 {
40 }
41 
43 {
44 }
45 
46 size_t
48 {
49  size_t totalLength = 0;
50 
51  for (StrategyChoice::const_iterator i = m_strategyChoice.begin();
52  i != m_strategyChoice.end();
53  ++i)
54  {
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
provides a publisher of Status Dataset or other segmented octet stream
represents the Strategy Choice table
The packet signing interface.
Definition: key-chain.hpp:48
virtual size_t generate(ndn::EncodingBuffer &outBuffer)
In a derived class, write the octets into outBuffer.
StrategyChoicePublisher(const StrategyChoice &strategyChoice, AppFace &face, const Name &prefix, ndn::KeyChain &keyChain)
EncodingImpl< EncoderTag > EncodingBuffer
Copyright (c) 2011-2015 Regents of the University of California.
Definition: ndn-common.hpp:40
size_t wireEncode(EncodingImpl< TAG > &encoder) const
const_iterator end() const
Name abstraction to represent an absolute name.
Definition: name.hpp:46
const_iterator begin() const
represents NFD StrategyChoice dataset
StrategyChoice & setName(const Name &name)