NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.0: NDN, CCN, CCNx, content centric networks
API Documentation
ndn-l3-tracer.hpp
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
20
#ifndef NDN_L3_TRACER_H
21
#define NDN_L3_TRACER_H
22
23
#include "ns3/ndnSIM/model/ndn-common.hpp"
24
25
#include "ns3/ptr.h"
26
#include "ns3/simple-ref-count.h"
27
28
namespace
nfd
{
29
namespace
pit {
30
class
Entry;
31
}
// namespace pit
32
}
// namespace nfd
33
34
namespace
ns3
{
35
36
class
Node;
37
class
Packet;
38
39
namespace
ndn
{
40
45
class
L3Tracer
:
public
SimpleRefCount<L3Tracer> {
46
public
:
51
L3Tracer
(Ptr<Node> node);
52
57
L3Tracer
(
const
std::string& node);
58
62
virtual
~
L3Tracer
();
63
69
virtual
void
70
PrintHeader(std::ostream& os)
const
= 0;
71
77
virtual
void
78
Print(std::ostream& os)
const
= 0;
79
80
protected
:
81
void
82
Connect();
83
84
virtual
void
85
OutInterests(
const
Interest
&,
const
Face&) = 0;
86
87
virtual
void
88
InInterests(
const
Interest
&,
const
Face&) = 0;
89
90
virtual
void
91
OutData(
const
Data
&,
const
Face&) = 0;
92
93
virtual
void
94
InData(
const
Data
&,
const
Face&) = 0;
95
96
virtual
void
97
SatisfiedInterests(
const
nfd::pit::Entry
&,
const
Face&,
const
Data
&) = 0;
98
99
virtual
void
100
TimedOutInterests(
const
nfd::pit::Entry
&) = 0;
101
102
protected
:
103
std::string
m_node
;
104
Ptr<Node>
m_nodePtr
;
105
106
struct
Stats
{
107
inline
void
108
Reset
()
109
{
110
m_inInterests = 0;
111
m_outInterests = 0;
112
m_inData = 0;
113
m_outData = 0;
114
m_satisfiedInterests = 0;
115
m_timedOutInterests = 0;
116
117
m_outSatisfiedInterests = 0;
118
m_outTimedOutInterests = 0;
119
}
120
121
double
m_inInterests
;
122
double
m_outInterests
;
123
double
m_inData
;
124
double
m_outData
;
125
double
m_satisfiedInterests
;
126
double
m_timedOutInterests
;
127
double
m_outSatisfiedInterests
;
128
double
m_outTimedOutInterests
;
129
};
130
};
131
135
inline
std::ostream&
136
operator<<
(std::ostream& os,
const
L3Tracer
& tracer)
137
{
138
os <<
"# "
;
139
tracer.
PrintHeader
(os);
140
os <<
"\n"
;
141
tracer.
Print
(os);
142
return
os;
143
}
144
145
}
// namespace ndn
146
}
// namespace ns3
147
148
#endif // NDN_L3_TRACER_H
ndn
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-strategy-choice-helper.hpp:34
ns3::ndn::L3Tracer::Stats::m_outData
double m_outData
Definition:
ndn-l3-tracer.hpp:124
ns3::ndn::L3Tracer::m_node
std::string m_node
Definition:
ndn-l3-tracer.hpp:103
ns3::ndn::L3Tracer::Stats::m_timedOutInterests
double m_timedOutInterests
Definition:
ndn-l3-tracer.hpp:126
ns3::ndn::L3Tracer::Stats::m_outTimedOutInterests
double m_outTimedOutInterests
Definition:
ndn-l3-tracer.hpp:128
ns3::ndn::L3Tracer::Stats::m_outSatisfiedInterests
double m_outSatisfiedInterests
Definition:
ndn-l3-tracer.hpp:127
ns3::ndn::L3Tracer::Stats
Definition:
ndn-l3-tracer.hpp:106
ns3::ndn::L3Tracer
Base class for network-layer (incoming/outgoing Interests and Data) tracing of NDN stack...
Definition:
ndn-l3-tracer.hpp:45
ns3::ndn::L3Tracer::Print
virtual void Print(std::ostream &os) const =0
Print current trace data.
nfd::operator<<
std::ostream & operator<<(std::ostream &os, const Network &network)
Definition:
network.cpp:58
nfd
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-common.hpp:40
ns3::ndn::L3Tracer::Stats::Reset
void Reset()
Definition:
ndn-l3-tracer.hpp:108
ns3::ndn::L3Tracer::Stats::m_satisfiedInterests
double m_satisfiedInterests
Definition:
ndn-l3-tracer.hpp:125
nfd::pit::Entry
represents a PIT entry
Definition:
pit-entry.hpp:69
ns3::ndn::L3Tracer::Stats::m_inData
double m_inData
Definition:
ndn-l3-tracer.hpp:123
ns3
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
content-store-impl.cpp:38
ns3::ndn::Data
ns3::ndn::L3Tracer::Stats::m_outInterests
double m_outInterests
Definition:
ndn-l3-tracer.hpp:122
ns3::ndn::L3Tracer::Stats::m_inInterests
double m_inInterests
Definition:
ndn-l3-tracer.hpp:121
ns3::ndn::L3Tracer::m_nodePtr
Ptr< Node > m_nodePtr
Definition:
ndn-l3-tracer.hpp:104
ns3::ndn::Interest
ns3::ndn::L3Tracer::PrintHeader
virtual void PrintHeader(std::ostream &os) const =0
Print head of the trace (e.g., for post-processing)
ndnSIM
utils
tracers
ndn-l3-tracer.hpp
Generated on Sat Nov 12 2016 16:02:54 for ndnSIM by
1.8.12