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
"
26
#include "
ndn-cxx/mgmt/nfd/forwarder-status.hpp
"
27
#include "
ndn-cxx/mgmt/nfd/face-status.hpp
"
28
#include "
ndn-cxx/mgmt/nfd/face-query-filter.hpp
"
29
#include "
ndn-cxx/mgmt/nfd/channel-status.hpp
"
30
#include "
ndn-cxx/mgmt/nfd/fib-entry.hpp
"
31
#include "
ndn-cxx/mgmt/nfd/cs-info.hpp
"
32
#include "
ndn-cxx/mgmt/nfd/strategy-choice.hpp
"
33
#include "
ndn-cxx/mgmt/nfd/rib-entry.hpp
"
34
35
namespace
ndn
{
36
namespace
nfd
{
37
43
class
StatusDataset
: noncopyable
44
{
45
public
:
46
virtual
47
~StatusDataset
();
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
75
class
ParseResultError
:
public
tlv::Error
76
{
77
public
:
78
using
tlv::Error::Error
;
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
116
class
ForwarderGeneralStatusDataset
:
public
StatusDataset
117
{
118
public
:
119
ForwarderGeneralStatusDataset
();
120
121
using
ResultType
=
ForwarderStatus
;
122
123
ResultType
124
parseResult
(
ConstBufferPtr
payload)
const
;
125
};
126
131
class
FaceDatasetBase
:
public
StatusDataset
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
149
class
FaceDataset
:
public
FaceDatasetBase
150
{
151
public
:
152
FaceDataset
();
153
};
154
160
class
FaceQueryDataset
:
public
FaceDatasetBase
161
{
162
public
:
163
using
ParamType
=
FaceQueryFilter
;
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
181
class
ChannelDataset
:
public
StatusDataset
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
213
class
CsInfoDataset
:
public
StatusDataset
214
{
215
public
:
216
CsInfoDataset
();
217
218
using
ResultType
=
CsInfo
;
219
220
ResultType
221
parseResult
(
ConstBufferPtr
payload)
const
;
222
};
223
229
class
StrategyChoiceDataset
:
public
StatusDataset
230
{
231
public
:
232
StrategyChoiceDataset
();
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
ndn::nfd::FaceDataset
represents a faces/list dataset
Definition:
status-dataset.hpp:150
ndn::nfd::ChannelDataset::ChannelDataset
ChannelDataset()
Definition:
status-dataset.cpp:119
ndn::nfd::StrategyChoiceDataset::StrategyChoiceDataset
StrategyChoiceDataset()
Definition:
status-dataset.cpp:152
ndn::nfd::StrategyChoiceDataset
represents a strategy-choice/list dataset
Definition:
status-dataset.hpp:230
rib-entry.hpp
ndn::nfd::StatusDataset
base class of NFD StatusDataset
Definition:
status-dataset.hpp:44
ndn::nfd::StatusDataset::ResultType
std::vector< int > ResultType
provides the result type, usually a vector
Definition:
status-dataset.hpp:69
face-status.hpp
ndn::nfd::CsInfoDataset::CsInfoDataset
CsInfoDataset()
Definition:
status-dataset.cpp:141
ndn::nfd::ForwarderGeneralStatusDataset
represents a status/general dataset
Definition:
status-dataset.hpp:117
forwarder-status.hpp
ndn::nfd::StatusDataset::~StatusDataset
virtual ~StatusDataset()
ndn::nfd::StatusDataset::StatusDataset
StatusDataset(const PartialName &datasetName)
constructs a StatusDataset instance with given sub-prefix
Definition:
status-dataset.cpp:28
name.hpp
face-query-filter.hpp
ndn::nfd::StatusDataset::ParseResultError
indicates reassembled payload cannot be parsed as ResultType
Definition:
status-dataset.hpp:76
channel-status.hpp
ndn::nfd::FibDataset::parseResult
ResultType parseResult(ConstBufferPtr payload) const
Definition:
status-dataset.cpp:136
ndn::nfd::FibDataset
represents a fib/list dataset
Definition:
status-dataset.hpp:198
ndn::nfd::ChannelDataset
represents a faces/channels dataset
Definition:
status-dataset.hpp:182
ndn::nfd::StatusDataset::getDatasetPrefix
Name getDatasetPrefix(const Name &prefix) const
constructs a name prefix for the dataset
Definition:
status-dataset.cpp:36
ndn::Name
Represents an absolute name.
Definition:
name.hpp:44
nfd
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-common.hpp:40
ndn::tlv::nfd::CsInfo
@ CsInfo
Definition:
tlv-nfd.hpp:90
ndn::nfd::FaceDatasetBase::FaceDatasetBase
FaceDatasetBase(const PartialName &datasetName)
Definition:
status-dataset.cpp:91
ndn::nfd::FaceDataset::FaceDataset
FaceDataset()
Definition:
status-dataset.cpp:102
ndn::nfd::RibDataset::RibDataset
RibDataset()
Definition:
status-dataset.cpp:163
ndn::tlv::nfd::FaceQueryFilter
@ FaceQueryFilter
Definition:
tlv-nfd.hpp:73
ndn::nfd::StatusDataset::ParamType
int ParamType
if defined, specifies constructor argument type; otherwise, constructor has no argument
Definition:
status-dataset.hpp:54
ndn::nfd::StrategyChoiceDataset::parseResult
ResultType parseResult(ConstBufferPtr payload) const
Definition:
status-dataset.cpp:158
ndn::nfd::FaceQueryDataset
represents a faces/query dataset
Definition:
status-dataset.hpp:161
ndn::nfd::StatusDataset::parseResult
ResultType parseResult(ConstBufferPtr payload) const
parses a result from reassembled payload
cs-info.hpp
ndn::nfd::ForwarderGeneralStatusDataset::parseResult
ResultType parseResult(ConstBufferPtr payload) const
Definition:
status-dataset.cpp:86
ndn::nfd::CsInfoDataset
represents a cs/info dataset
Definition:
status-dataset.hpp:214
ndn::nfd::FaceDatasetBase
provides common functionality among FaceDataset and FaceQueryDataset
Definition:
status-dataset.hpp:132
ndn::nfd::FaceQueryDataset::FaceQueryDataset
FaceQueryDataset(const FaceQueryFilter &filter)
Definition:
status-dataset.cpp:107
ndn::name
Definition:
name-component-types.hpp:33
ndn::nfd::FaceDatasetBase::parseResult
ResultType parseResult(ConstBufferPtr payload) const
Definition:
status-dataset.cpp:97
ndn::nfd::ChannelDataset::parseResult
ResultType parseResult(ConstBufferPtr payload) const
Definition:
status-dataset.cpp:125
fib-entry.hpp
ndn::nfd::RibDataset::parseResult
ResultType parseResult(ConstBufferPtr payload) const
Definition:
status-dataset.cpp:169
ndn::nfd::RibDataset
represents a rib/list dataset
Definition:
status-dataset.hpp:246
strategy-choice.hpp
ndn::tlv::Error
represents an error in TLV encoding or decoding
Definition:
tlv.hpp:53
ndn::nfd::ForwarderGeneralStatusDataset::ForwarderGeneralStatusDataset
ForwarderGeneralStatusDataset()
Definition:
status-dataset.cpp:80
ndn::tlv::Error::Error
Error(const char *expectedType, uint32_t actualType)
Definition:
tlv.cpp:27
ndn::ConstBufferPtr
shared_ptr< const Buffer > ConstBufferPtr
Definition:
buffer.hpp:126
ndn::nfd::ForwarderStatus
represents NFD General Status dataset
Definition:
forwarder-status.hpp:37
ndn::nfd::FaceQueryFilter
represents Face Query Filter
Definition:
face-query-filter.hpp:37
ndn
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-strategy-choice-helper.hpp:34
ndn::nfd::CsInfoDataset::parseResult
ResultType parseResult(ConstBufferPtr payload) const
Definition:
status-dataset.cpp:147
ndn::nfd::FibDataset::FibDataset
FibDataset()
Definition:
status-dataset.cpp:130
ndnSIM
ndn-cxx
ndn-cxx
mgmt
nfd
status-dataset.hpp
Generated on Mon Jun 1 2020 22:32:14 for ndnSIM by
1.8.18