NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.3: NDN, CCN, CCNx, content centric networks
API Documentation
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
face-status.hpp
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2013-2017 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_FACE_STATUS_HPP
23
#define NDN_MGMT_NFD_FACE_STATUS_HPP
24
25
#include "
face-traits.hpp
"
26
#include "../../util/time.hpp"
27
28
namespace
ndn
{
29
namespace
nfd
{
30
36
class
FaceStatus
:
public
FaceTraits
<FaceStatus>
37
{
38
public
:
39
FaceStatus
();
40
41
explicit
42
FaceStatus
(
const
Block
& block);
43
46
template
<encoding::Tag TAG>
47
size_t
48
wireEncode
(EncodingImpl<TAG>& encoder)
const
;
49
52
const
Block
&
53
wireEncode
()
const
;
54
57
void
58
wireDecode
(
const
Block
& wire);
59
60
public
:
// getters & setters
61
bool
62
hasExpirationPeriod
()
const
63
{
64
return
!!m_expirationPeriod;
65
}
66
67
time::milliseconds
68
getExpirationPeriod
()
const
69
{
70
BOOST_ASSERT(
hasExpirationPeriod
());
71
return
*m_expirationPeriod;
72
}
73
74
FaceStatus
&
75
setExpirationPeriod
(
time::milliseconds
expirationPeriod);
76
77
FaceStatus
&
78
unsetExpirationPeriod
();
79
80
uint64_t
81
getNInInterests
()
const
82
{
83
return
m_nInInterests;
84
}
85
86
FaceStatus
&
87
setNInInterests
(uint64_t nInInterests);
88
89
uint64_t
90
getNInData
()
const
91
{
92
return
m_nInData;
93
}
94
95
FaceStatus
&
96
setNInData
(uint64_t nInData);
97
98
uint64_t
99
getNInNacks
()
const
100
{
101
return
m_nInNacks;
102
}
103
104
FaceStatus
&
105
setNInNacks
(uint64_t nInNacks);
106
107
uint64_t
108
getNOutInterests
()
const
109
{
110
return
m_nOutInterests;
111
}
112
113
FaceStatus
&
114
setNOutInterests
(uint64_t nOutInterests);
115
116
uint64_t
117
getNOutData
()
const
118
{
119
return
m_nOutData;
120
}
121
122
FaceStatus
&
123
setNOutData
(uint64_t nOutData);
124
125
uint64_t
126
getNOutNacks
()
const
127
{
128
return
m_nOutNacks;
129
}
130
131
FaceStatus
&
132
setNOutNacks
(uint64_t nOutNacks);
133
134
uint64_t
135
getNInBytes
()
const
136
{
137
return
m_nInBytes;
138
}
139
140
FaceStatus
&
141
setNInBytes
(uint64_t nInBytes);
142
143
uint64_t
144
getNOutBytes
()
const
145
{
146
return
m_nOutBytes;
147
}
148
149
FaceStatus
&
150
setNOutBytes
(uint64_t nOutBytes);
151
152
private
:
153
optional<time::milliseconds>
m_expirationPeriod;
154
uint64_t m_nInInterests;
155
uint64_t m_nInData;
156
uint64_t m_nInNacks;
157
uint64_t m_nOutInterests;
158
uint64_t m_nOutData;
159
uint64_t m_nOutNacks;
160
uint64_t m_nInBytes;
161
uint64_t m_nOutBytes;
162
};
163
164
NDN_CXX_DECLARE_WIRE_ENCODE_INSTANTIATIONS
(
FaceStatus
);
165
166
bool
167
operator==
(
const
FaceStatus
& a,
const
FaceStatus
& b);
168
169
inline
bool
170
operator!=
(
const
FaceStatus
& a,
const
FaceStatus
& b)
171
{
172
return
!(a == b);
173
}
174
175
std::ostream&
176
operator<<
(std::ostream& os,
const
FaceStatus
& status);
177
178
}
// namespace nfd
179
}
// namespace ndn
180
181
#endif // NDN_MGMT_NFD_FACE_STATUS_HPP
ndn::nfd::FaceStatus::getNInNacks
uint64_t getNInNacks() const
Definition:
face-status.hpp:99
ndn::nfd::FaceStatus::wireDecode
void wireDecode(const Block &wire)
decode FaceStatus
Definition:
face-status.cpp:101
ndn
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-strategy-choice-helper.hpp:34
ndn::nfd::operator!=
bool operator!=(const ChannelStatus &a, const ChannelStatus &b)
Definition:
channel-status.hpp:85
ndn::nfd::FaceStatus::hasExpirationPeriod
bool hasExpirationPeriod() const
Definition:
face-status.hpp:62
websocketpp::lib::asio::milliseconds
boost::posix_time::time_duration milliseconds(long duration)
Definition:
asio.hpp:117
ndn::nfd::FaceStatus::getExpirationPeriod
time::milliseconds getExpirationPeriod() const
Definition:
face-status.hpp:68
ndn::optional< time::milliseconds >
ndn::Block
Represents a TLV element of NDN packet format.
Definition:
block.hpp:42
ndn::nfd::FaceStatus::setNOutBytes
FaceStatus & setNOutBytes(uint64_t nOutBytes)
Definition:
face-status.cpp:312
ndn::nfd::FaceStatus::setNOutInterests
FaceStatus & setNOutInterests(uint64_t nOutInterests)
Definition:
face-status.cpp:280
ndn::nfd::FaceStatus::setExpirationPeriod
FaceStatus & setExpirationPeriod(time::milliseconds expirationPeriod)
Definition:
face-status.cpp:240
ndn::nfd::FaceStatus::setNInInterests
FaceStatus & setNInInterests(uint64_t nInInterests)
Definition:
face-status.cpp:256
ndn::nfd::FaceStatus::setNInBytes
FaceStatus & setNInBytes(uint64_t nInBytes)
Definition:
face-status.cpp:304
ndn::nfd::FaceStatus::unsetExpirationPeriod
FaceStatus & unsetExpirationPeriod()
Definition:
face-status.cpp:248
ndn::nfd::FaceStatus::getNInInterests
uint64_t getNInInterests() const
Definition:
face-status.hpp:81
ndn::nfd::FaceStatus::setNInNacks
FaceStatus & setNInNacks(uint64_t nInNacks)
Definition:
face-status.cpp:272
nfd
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-common.hpp:40
ndn::nfd::FaceStatus::setNOutData
FaceStatus & setNOutData(uint64_t nOutData)
Definition:
face-status.cpp:288
ndn::nfd::operator==
bool operator==(const ChannelStatus &a, const ChannelStatus &b)
Definition:
channel-status.cpp:96
ndn::nfd::FaceStatus
represents an item in NFD Face dataset
Definition:
face-status.hpp:36
ndn::nfd::FaceStatus::getNOutData
uint64_t getNOutData() const
Definition:
face-status.hpp:117
face-traits.hpp
ndn::nfd::operator<<
std::ostream & operator<<(std::ostream &os, FaceScope faceScope)
Definition:
nfd-constants.cpp:35
ndn::nfd::FaceStatus::getNOutBytes
uint64_t getNOutBytes() const
Definition:
face-status.hpp:144
ndn::nfd::FaceStatus::getNOutInterests
uint64_t getNOutInterests() const
Definition:
face-status.hpp:108
ndn::nfd::NDN_CXX_DECLARE_WIRE_ENCODE_INSTANTIATIONS
NDN_CXX_DECLARE_WIRE_ENCODE_INSTANTIATIONS(ChannelStatus)
ndn::nfd::FaceStatus::setNOutNacks
FaceStatus & setNOutNacks(uint64_t nOutNacks)
Definition:
face-status.cpp:296
ndn::nfd::FaceStatus::getNInBytes
uint64_t getNInBytes() const
Definition:
face-status.hpp:135
ndn::nfd::FaceTraits
provides getters and setters for face information fields
Definition:
face-traits.hpp:37
ndn::nfd::FaceStatus::getNInData
uint64_t getNInData() const
Definition:
face-status.hpp:90
ndn::nfd::FaceStatus::setNInData
FaceStatus & setNInData(uint64_t nInData)
Definition:
face-status.cpp:264
ndn::nfd::FaceStatus::wireEncode
const Block & wireEncode() const
encode FaceStatus
Definition:
face-status.cpp:85
ndn::nfd::FaceStatus::getNOutNacks
uint64_t getNOutNacks() const
Definition:
face-status.hpp:126
ndn::nfd::FaceStatus::FaceStatus
FaceStatus()
Definition:
face-status.cpp:34
ndnSIM
ndn-cxx
src
mgmt
nfd
face-status.hpp
Generated on Thu Nov 2 2017 03:30:28 for ndnSIM by
1.8.11