NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.0: NDN, CCN, CCNx, content centric networks
API Documentation
nfd-face-status.hpp
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
22
#ifndef NDN_MANAGEMENT_NFD_FACE_STATUS_HPP
23
#define NDN_MANAGEMENT_NFD_FACE_STATUS_HPP
24
25
#include "
nfd-face-traits.hpp
"
// include this first, to ensure it compiles on its own.
26
#include "../encoding/block.hpp"
27
#include "../util/time.hpp"
28
29
namespace
ndn
{
30
namespace
nfd
{
31
37
class
FaceStatus
:
public
FaceTraits
<FaceStatus>
38
{
39
public
:
40
FaceStatus
();
41
42
explicit
43
FaceStatus
(
const
Block
& block);
44
47
template
<encoding::Tag TAG>
48
size_t
49
wireEncode
(
EncodingImpl<TAG>
& encoder)
const
;
50
53
const
Block
&
54
wireEncode
()
const
;
55
58
void
59
wireDecode
(
const
Block
& wire);
60
61
public
:
// getters & setters
62
bool
63
hasExpirationPeriod
()
const
64
{
65
return
m_hasExpirationPeriod;
66
}
67
68
const
time::milliseconds&
69
getExpirationPeriod
()
const
70
{
71
BOOST_ASSERT(m_hasExpirationPeriod);
72
return
m_expirationPeriod;
73
}
74
75
FaceStatus
&
76
setExpirationPeriod
(
const
time::milliseconds& expirationPeriod);
77
78
uint64_t
79
getNInInterests
()
const
80
{
81
return
m_nInInterests;
82
}
83
84
FaceStatus
&
85
setNInInterests
(uint64_t nInInterests);
86
87
uint64_t
88
getNInDatas
()
const
89
{
90
return
m_nInDatas;
91
}
92
93
FaceStatus
&
94
setNInDatas
(uint64_t nInDatas);
95
96
uint64_t
97
getNInNacks
()
const
98
{
99
return
m_nInNacks;
100
}
101
102
FaceStatus
&
103
setNInNacks
(uint64_t nInNacks);
104
105
uint64_t
106
getNOutInterests
()
const
107
{
108
return
m_nOutInterests;
109
}
110
111
FaceStatus
&
112
setNOutInterests
(uint64_t nOutInterests);
113
114
uint64_t
115
getNOutDatas
()
const
116
{
117
return
m_nOutDatas;
118
}
119
120
FaceStatus
&
121
setNOutDatas
(uint64_t nOutDatas);
122
123
uint64_t
124
getNOutNacks
()
const
125
{
126
return
m_nOutNacks;
127
}
128
129
FaceStatus
&
130
setNOutNacks
(uint64_t nOutNacks);
131
132
uint64_t
133
getNInBytes
()
const
134
{
135
return
m_nInBytes;
136
}
137
138
FaceStatus
&
139
setNInBytes
(uint64_t nInBytes);
140
141
uint64_t
142
getNOutBytes
()
const
143
{
144
return
m_nOutBytes;
145
}
146
147
FaceStatus
&
148
setNOutBytes
(uint64_t nOutBytes);
149
150
protected
:
151
void
152
wireReset
()
const
;
153
154
private
:
155
time::milliseconds m_expirationPeriod;
156
bool
m_hasExpirationPeriod;
157
uint64_t m_nInInterests;
158
uint64_t m_nInDatas;
159
uint64_t m_nInNacks;
160
uint64_t m_nOutInterests;
161
uint64_t m_nOutDatas;
162
uint64_t m_nOutNacks;
163
uint64_t m_nInBytes;
164
uint64_t m_nOutBytes;
165
166
mutable
Block
m_wire;
167
};
168
169
std::ostream&
170
operator<<
(std::ostream& os,
const
FaceStatus
& status);
171
172
}
// namespace nfd
173
}
// namespace ndn
174
175
#endif // NDN_MANAGEMENT_NFD_FACE_STATUS_HPP
ndn::nfd::FaceStatus::wireDecode
void wireDecode(const Block &wire)
decode FaceStatus
Definition:
nfd-face-status.cpp:121
ndn::nfd::FaceStatus::getNOutInterests
uint64_t getNOutInterests() const
Definition:
nfd-face-status.hpp:106
ndn
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-strategy-choice-helper.hpp:34
ndn::nfd::FaceStatus::getExpirationPeriod
const time::milliseconds & getExpirationPeriod() const
Definition:
nfd-face-status.hpp:69
ndn::nfd::FaceStatus::setNInDatas
FaceStatus & setNInDatas(uint64_t nInDatas)
Definition:
nfd-face-status.cpp:271
ndn::nfd::FaceStatus::hasExpirationPeriod
bool hasExpirationPeriod() const
Definition:
nfd-face-status.hpp:63
ndn::nfd::FaceStatus::getNOutNacks
uint64_t getNOutNacks() const
Definition:
nfd-face-status.hpp:124
ndn::nfd::FaceStatus::getNOutBytes
uint64_t getNOutBytes() const
Definition:
nfd-face-status.hpp:142
ndn::nfd::FaceStatus::getNInInterests
uint64_t getNInInterests() const
Definition:
nfd-face-status.hpp:79
ndn::nfd::FaceStatus::setNOutDatas
FaceStatus & setNOutDatas(uint64_t nOutDatas)
Definition:
nfd-face-status.cpp:295
ndn::Block
Class representing a wire element of NDN-TLV packet format.
Definition:
block.hpp:43
ndn::nfd::FaceStatus::setNOutBytes
FaceStatus & setNOutBytes(uint64_t nOutBytes)
Definition:
nfd-face-status.cpp:319
ndn::nfd::FaceStatus::setNOutInterests
FaceStatus & setNOutInterests(uint64_t nOutInterests)
Definition:
nfd-face-status.cpp:287
ndn::nfd::FaceStatus::setNInInterests
FaceStatus & setNInInterests(uint64_t nInInterests)
Definition:
nfd-face-status.cpp:263
ndn::nfd::FaceStatus::getNInBytes
uint64_t getNInBytes() const
Definition:
nfd-face-status.hpp:133
ndn::nfd::FaceStatus::setNInBytes
FaceStatus & setNInBytes(uint64_t nInBytes)
Definition:
nfd-face-status.cpp:311
ndn::nfd::FaceStatus::setNInNacks
FaceStatus & setNInNacks(uint64_t nInNacks)
Definition:
nfd-face-status.cpp:279
ndn::nfd::FaceStatus::wireReset
void wireReset() const
Definition:
nfd-face-status.cpp:327
nfd
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-common.hpp:40
ndn::nfd::FaceStatus::setExpirationPeriod
FaceStatus & setExpirationPeriod(const time::milliseconds &expirationPeriod)
Definition:
nfd-face-status.cpp:254
ndn::nfd::FaceStatus
represents Face status
Definition:
nfd-face-status.hpp:37
ndn::nfd::operator<<
std::ostream & operator<<(std::ostream &os, FaceScope faceScope)
Definition:
nfd-constants.cpp:30
ndn::encoding::EncodingImpl
Definition:
encoding-buffer-fwd.hpp:45
ndn::nfd::FaceStatus::getNOutDatas
uint64_t getNOutDatas() const
Definition:
nfd-face-status.hpp:115
ndn::nfd::FaceStatus::getNInDatas
uint64_t getNInDatas() const
Definition:
nfd-face-status.hpp:88
ndn::nfd::FaceStatus::setNOutNacks
FaceStatus & setNOutNacks(uint64_t nOutNacks)
Definition:
nfd-face-status.cpp:303
ndn::nfd::FaceTraits
providers getters and setters of face information fields
Definition:
nfd-face-traits.hpp:36
ndn::nfd::FaceStatus::wireEncode
const Block & wireEncode() const
encode FaceStatus
Definition:
nfd-face-status.cpp:105
nfd-face-traits.hpp
ndn::nfd::FaceStatus::getNInNacks
uint64_t getNInNacks() const
Definition:
nfd-face-status.hpp:97
ndn::nfd::FaceStatus::FaceStatus
FaceStatus()
Definition:
nfd-face-status.cpp:36
ndnSIM
ndn-cxx
src
management
nfd-face-status.hpp
Generated on Sat Nov 12 2016 16:02:52 for ndnSIM by
1.8.12