NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.3: NDN, CCN, CCNx, content centric networks
API Documentation
status-dataset.hpp
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
22 #ifndef NDN_MGMT_NFD_STATUS_DATASET_HPP
23 #define NDN_MGMT_NFD_STATUS_DATASET_HPP
24 
25 #include "../../name.hpp"
26 #include "forwarder-status.hpp"
27 #include "face-status.hpp"
28 #include "face-query-filter.hpp"
29 #include "channel-status.hpp"
30 #include "fib-entry.hpp"
31 #include "strategy-choice.hpp"
32 #include "rib-entry.hpp"
33 
34 namespace ndn {
35 namespace nfd {
36 
42 class StatusDataset : noncopyable
43 {
44 public:
45 #ifdef DOXYGEN
46 
50  typedef int ParamType;
51 #endif
52 
58  Name
59  getDatasetPrefix(const Name& prefix) const;
60 
61 #ifdef DOXYGEN
62 
65  typedef std::vector<int> ResultType;
66 #endif
67 
72  {
73  public:
74  explicit
75  ParseResultError(const std::string& what)
76  : tlv::Error(what)
77  {
78  }
79  };
80 
81 #ifdef DOXYGEN
82 
87  ResultType
88  parseResult(ConstBufferPtr payload) const;
89 #endif
90 
91 protected:
96  explicit
97  StatusDataset(const PartialName& datasetName);
98 
99 private:
104  virtual void
105  addParameters(Name& name) const;
106 
107 private:
108  PartialName m_datasetName;
109 };
110 
111 
118 {
119 public:
121 
123 
124  ResultType
125  parseResult(ConstBufferPtr payload) const;
126 };
127 
128 
134 {
135 public:
136  typedef std::vector<FaceStatus> ResultType;
137 
138  ResultType
139  parseResult(ConstBufferPtr payload) const;
140 
141 protected:
142  explicit
143  FaceDatasetBase(const PartialName& datasetName);
144 };
145 
146 
153 {
154 public:
155  FaceDataset();
156 };
157 
158 
165 {
166 public:
168 
169  explicit
170  FaceQueryDataset(const FaceQueryFilter& filter);
171 
172 private:
173  virtual void
174  addParameters(Name& name) const override;
175 
176 private:
177  FaceQueryFilter m_filter;
178 };
179 
180 
187 {
188 public:
189  ChannelDataset();
190 
191  typedef std::vector<ChannelStatus> ResultType;
192 
193  ResultType
194  parseResult(ConstBufferPtr payload) const;
195 };
196 
197 
203 class FibDataset : public StatusDataset
204 {
205 public:
206  FibDataset();
207 
208  typedef std::vector<FibEntry> ResultType;
209 
210  ResultType
211  parseResult(ConstBufferPtr payload) const;
212 };
213 
214 
221 {
222 public:
224 
225  typedef std::vector<StrategyChoice> ResultType;
226 
227  ResultType
228  parseResult(ConstBufferPtr payload) const;
229 };
230 
231 
237 class RibDataset : public StatusDataset
238 {
239 public:
240  RibDataset();
241 
242  typedef std::vector<RibEntry> ResultType;
243 
244  ResultType
245  parseResult(ConstBufferPtr payload) const;
246 };
247 
248 
249 } // namespace nfd
250 } // namespace ndn
251 
252 #endif // NDN_MGMT_NFD_STATUS_DATASET_HPP
provides common functionality among FaceDataset and FaceQueryDataset
indicates reassembled payload cannot be parsed as ResultType
represents NFD Forwarder Status
Copyright (c) 2011-2015 Regents of the University of California.
represents a status/general dataset
Error(const std::string &what)
Definition: tlv.hpp:54
base class of NFD StatusDataset
Name getDatasetPrefix(const Name &prefix) const
constructs a name prefix for the dataset
std::vector< FaceStatus > ResultType
represents a rib/list dataset
Copyright (c) 2011-2015 Regents of the University of California.
Definition: ndn-common.hpp:40
StatusDataset(const PartialName &datasetName)
constructs a StatusDataset instance with given sub-prefix
std::vector< int > ResultType
provides the result type, usually a vector
represents a strategy-choice/list dataset
Name abstraction to represent an absolute name.
Definition: name.hpp:46
std::vector< FibEntry > ResultType
represents Face Query Filter
std::vector< ChannelStatus > ResultType
represents a faces/list dataset
std::vector< StrategyChoice > ResultType
represents a faces/channels dataset
shared_ptr< const Buffer > ConstBufferPtr
Definition: buffer.hpp:33
int ParamType
if defined, specifies constructor argument type; otherwise, constructor has no argument ...
ResultType parseResult(ConstBufferPtr payload) const
parses a result from reassembled payload
represents a faces/query dataset
represents a fib/list dataset
represents an error in TLV encoding or decoding
Definition: tlv.hpp:50
std::vector< RibEntry > ResultType