NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: 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; -*- */
2 /*
3  * Copyright (c) 2013-2018 Regents of the University of California.
4  *
5  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
6  *
7  * ndn-cxx library is free software: you can redistribute it and/or modify it under the
8  * terms of the GNU Lesser General Public License as published by the Free Software
9  * Foundation, either version 3 of the License, or (at your option) any later version.
10  *
11  * ndn-cxx library is distributed in the hope that it will be useful, but WITHOUT ANY
12  * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
13  * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
14  *
15  * You should have received copies of the GNU General Public License and GNU Lesser
16  * General Public License along with ndn-cxx, e.g., in COPYING.md file. If not, see
17  * <http://www.gnu.org/licenses/>.
18  *
19  * See AUTHORS.md for complete list of ndn-cxx authors and contributors.
20  */
21 
22 #ifndef NDN_MGMT_NFD_STATUS_DATASET_HPP
23 #define NDN_MGMT_NFD_STATUS_DATASET_HPP
24 
25 #include "ndn-cxx/name.hpp"
34 
35 namespace ndn {
36 namespace nfd {
37 
43 class StatusDataset : noncopyable
44 {
45 public:
46  virtual
48 
49 #ifdef DOXYGEN
50 
54  using ParamType = int;
55 #endif
56 
62  Name
63  getDatasetPrefix(const Name& prefix) const;
64 
65 #ifdef DOXYGEN
66 
69  using ResultType = std::vector<int>;
70 #endif
71 
76  {
77  public:
78  using tlv::Error::Error;
79  };
80 
81 #ifdef DOXYGEN
82 
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 
117 {
118 public:
120 
122 
123  ResultType
124  parseResult(ConstBufferPtr payload) const;
125 };
126 
132 {
133 public:
134  using ResultType = std::vector<FaceStatus>;
135 
136  ResultType
137  parseResult(ConstBufferPtr payload) const;
138 
139 protected:
140  explicit
141  FaceDatasetBase(const PartialName& datasetName);
142 };
143 
150 {
151 public:
152  FaceDataset();
153 };
154 
161 {
162 public:
164 
165  explicit
166  FaceQueryDataset(const FaceQueryFilter& filter);
167 
168 private:
169  void
170  addParameters(Name& name) const override;
171 
172 private:
173  FaceQueryFilter m_filter;
174 };
175 
182 {
183 public:
184  ChannelDataset();
185 
186  using ResultType = std::vector<ChannelStatus>;
187 
188  ResultType
189  parseResult(ConstBufferPtr payload) const;
190 };
191 
197 class FibDataset : public StatusDataset
198 {
199 public:
200  FibDataset();
201 
202  using ResultType = std::vector<FibEntry>;
203 
204  ResultType
205  parseResult(ConstBufferPtr payload) const;
206 };
207 
214 {
215 public:
216  CsInfoDataset();
217 
219 
220  ResultType
221  parseResult(ConstBufferPtr payload) const;
222 };
223 
230 {
231 public:
233 
234  using ResultType = std::vector<StrategyChoice>;
235 
236  ResultType
237  parseResult(ConstBufferPtr payload) const;
238 };
239 
245 class RibDataset : public StatusDataset
246 {
247 public:
248  RibDataset();
249 
250  using ResultType = std::vector<RibEntry>;
251 
252  ResultType
253  parseResult(ConstBufferPtr payload) const;
254 };
255 
256 } // namespace nfd
257 } // namespace ndn
258 
259 #endif // NDN_MGMT_NFD_STATUS_DATASET_HPP
ResultType parseResult(ConstBufferPtr payload) const
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.
represents a status/general dataset
represents a cs/info dataset
std::vector< int > ResultType
provides the result type, usually a vector
FaceDatasetBase(const PartialName &datasetName)
ResultType parseResult(ConstBufferPtr payload) const
base class of NFD StatusDataset
Name getDatasetPrefix(const Name &prefix) const
constructs a name prefix for the dataset
ResultType parseResult(ConstBufferPtr payload) const
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
represents a strategy-choice/list dataset
ResultType parseResult(ConstBufferPtr payload) const
Represents an absolute name.
Definition: name.hpp:43
ResultType parseResult(ConstBufferPtr payload) const
represents Face Query Filter
ResultType parseResult(ConstBufferPtr payload) const
int ParamType
if defined, specifies constructor argument type; otherwise, constructor has no argument
represents a faces/list dataset
represents a faces/channels dataset
FaceQueryDataset(const FaceQueryFilter &filter)
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:52
ResultType parseResult(ConstBufferPtr payload) const
shared_ptr< const Buffer > ConstBufferPtr
Definition: buffer.hpp:126