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  virtual
47 
48 #ifdef DOXYGEN
49 
53  typedef int ParamType;
54 #endif
55 
61  Name
62  getDatasetPrefix(const Name& prefix) const;
63 
64 #ifdef DOXYGEN
65 
68  typedef std::vector<int> ResultType;
69 #endif
70 
75  {
76  public:
77  explicit
78  ParseResultError(const std::string& what)
79  : tlv::Error(what)
80  {
81  }
82  };
83 
84 #ifdef DOXYGEN
85 
90  ResultType
91  parseResult(ConstBufferPtr payload) const;
92 #endif
93 
94 protected:
99  explicit
100  StatusDataset(const PartialName& datasetName);
101 
102 private:
107  virtual void
108  addParameters(Name& name) const;
109 
110 private:
111  PartialName m_datasetName;
112 };
113 
114 
121 {
122 public:
124 
126 
127  ResultType
128  parseResult(ConstBufferPtr payload) const;
129 };
130 
131 
137 {
138 public:
139  typedef std::vector<FaceStatus> ResultType;
140 
141  ResultType
142  parseResult(ConstBufferPtr payload) const;
143 
144 protected:
145  explicit
146  FaceDatasetBase(const PartialName& datasetName);
147 };
148 
149 
156 {
157 public:
158  FaceDataset();
159 };
160 
161 
168 {
169 public:
171 
172  explicit
173  FaceQueryDataset(const FaceQueryFilter& filter);
174 
175 private:
176  void
177  addParameters(Name& name) const override;
178 
179 private:
180  FaceQueryFilter m_filter;
181 };
182 
183 
190 {
191 public:
192  ChannelDataset();
193 
194  typedef std::vector<ChannelStatus> ResultType;
195 
196  ResultType
197  parseResult(ConstBufferPtr payload) const;
198 };
199 
200 
206 class FibDataset : public StatusDataset
207 {
208 public:
209  FibDataset();
210 
211  typedef std::vector<FibEntry> ResultType;
212 
213  ResultType
214  parseResult(ConstBufferPtr payload) const;
215 };
216 
217 
224 {
225 public:
227 
228  typedef std::vector<StrategyChoice> ResultType;
229 
230  ResultType
231  parseResult(ConstBufferPtr payload) const;
232 };
233 
234 
240 class RibDataset : public StatusDataset
241 {
242 public:
243  RibDataset();
244 
245  typedef std::vector<RibEntry> ResultType;
246 
247  ResultType
248  parseResult(ConstBufferPtr payload) const;
249 };
250 
251 
252 } // namespace nfd
253 } // namespace ndn
254 
255 #endif // NDN_MGMT_NFD_STATUS_DATASET_HPP
provides common functionality among FaceDataset and FaceQueryDataset
indicates reassembled payload cannot be parsed as ResultType
represents NFD General Status dataset
Copyright (c) 2011-2015 Regents of the University of California.
ResultType parseResult(ConstBufferPtr payload) const
parses a result from reassembled payload
represents a status/general dataset
Error(const std::string &what)
Definition: tlv.hpp:54
base class of NFD StatusDataset
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
Name getDatasetPrefix(const Name &prefix) const
constructs a name prefix for the dataset
represents a strategy-choice/list dataset
Represents an absolute name.
Definition: name.hpp:42
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
int ParamType
if defined, specifies constructor argument type; otherwise, constructor has no argument ...
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
shared_ptr< const Buffer > ConstBufferPtr
Definition: buffer.hpp:89