NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.0: NDN, CCN, CCNx, content centric networks
API Documentation
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
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
#include "ns3/ndnSIM/model/ndn-face.hpp"
25
26
#include "ns3/ptr.h"
27
#include "ns3/simple-ref-count.h"
28
29
namespace
nfd {
30
namespace
pit {
31
class
Entry;
32
}
// namespace pit
33
}
// namespace nfd
34
35
namespace
ns3 {
36
37
class
Node;
38
class
Packet;
39
40
namespace
ndn {
41
46
class
L3Tracer
:
public
SimpleRefCount<L3Tracer> {
47
public
:
52
L3Tracer
(Ptr<Node> node);
53
58
L3Tracer
(
const
std::string& node);
59
63
virtual
~L3Tracer
();
64
70
virtual
void
71
PrintHeader
(std::ostream& os)
const
= 0;
72
78
virtual
void
79
Print
(std::ostream& os)
const
= 0;
80
81
protected
:
82
void
83
Connect
();
84
85
virtual
void
86
OutInterests
(
const
Interest
&,
const
Face
&) = 0;
87
88
virtual
void
89
InInterests
(
const
Interest
&,
const
Face
&) = 0;
90
91
virtual
void
92
OutData
(
const
Data
&,
const
Face
&) = 0;
93
94
virtual
void
95
InData
(
const
Data
&,
const
Face
&) = 0;
96
97
virtual
void
98
SatisfiedInterests
(
const
nfd::pit::Entry
&,
const
Face
&,
const
Data
&) = 0;
99
100
virtual
void
101
TimedOutInterests
(
const
nfd::pit::Entry
&) = 0;
102
103
protected
:
104
std::string
m_node
;
105
Ptr<Node>
m_nodePtr
;
106
107
struct
Stats
{
108
inline
void
109
Reset
()
110
{
111
m_inInterests
= 0;
112
m_outInterests
= 0;
113
m_inData
= 0;
114
m_outData
= 0;
115
m_satisfiedInterests
= 0;
116
m_timedOutInterests
= 0;
117
118
m_outSatisfiedInterests
= 0;
119
m_outTimedOutInterests
= 0;
120
}
121
122
double
m_inInterests
;
123
double
m_outInterests
;
124
double
m_inData
;
125
double
m_outData
;
126
double
m_satisfiedInterests
;
127
double
m_timedOutInterests
;
128
double
m_outSatisfiedInterests
;
129
double
m_outTimedOutInterests
;
130
};
131
};
132
136
inline
std::ostream&
137
operator<<
(std::ostream& os,
const
L3Tracer
& tracer)
138
{
139
os <<
"# "
;
140
tracer.
PrintHeader
(os);
141
os <<
"\n"
;
142
tracer.
Print
(os);
143
return
os;
144
}
145
146
}
// namespace ndn
147
}
// namespace ns3
148
149
#endif // NDN_L3_TRACER_H
ns3::ndn::L3Tracer::Stats::m_outData
double m_outData
Definition:
ndn-l3-tracer.hpp:125
ns3::ndn::L3Tracer::m_node
std::string m_node
Definition:
ndn-l3-tracer.hpp:104
ns3::ndn::L3Tracer::Stats::m_timedOutInterests
double m_timedOutInterests
Definition:
ndn-l3-tracer.hpp:127
ns3::ndn::operator<<
std::ostream & operator<<(std::ostream &os, const ContentStore &cs)
Definition:
ndn-content-store.hpp:194
ns3::ndn::L3Tracer::Stats::m_outTimedOutInterests
double m_outTimedOutInterests
Definition:
ndn-l3-tracer.hpp:129
ns3::ndn::L3Tracer::Stats::m_outSatisfiedInterests
double m_outSatisfiedInterests
Definition:
ndn-l3-tracer.hpp:128
ns3::ndn::L3Tracer::SatisfiedInterests
virtual void SatisfiedInterests(const nfd::pit::Entry &, const Face &, const Data &)=0
ns3::ndn::L3Tracer::Connect
void Connect()
Definition:
ndn-l3-tracer.cpp:56
ns3::ndn::L3Tracer::Stats
Definition:
ndn-l3-tracer.hpp:107
nfd::Face
represents a face
Definition:
face.hpp:59
ns3::ndn::L3Tracer
Base class for network-layer (incoming/outgoing Interests and Data) tracing of NDN stack...
Definition:
ndn-l3-tracer.hpp:46
ns3::ndn::L3Tracer::~L3Tracer
virtual ~L3Tracer()
Destructor.
Definition:
ndn-l3-tracer.cpp:53
ns3::ndn::L3Tracer::Print
virtual void Print(std::ostream &os) const =0
Print current trace data.
ns3::ndn::L3Tracer::L3Tracer
L3Tracer(Ptr< Node > node)
Trace constructor that attaches to the node using node pointer.
Definition:
ndn-l3-tracer.cpp:34
ns3::ndn::L3Tracer::Stats::Reset
void Reset()
Definition:
ndn-l3-tracer.hpp:109
ns3::ndn::L3Tracer::Stats::m_satisfiedInterests
double m_satisfiedInterests
Definition:
ndn-l3-tracer.hpp:126
nfd::pit::Entry
represents a PIT entry
Definition:
pit-entry.hpp:67
ns3::ndn::L3Tracer::Stats::m_inData
double m_inData
Definition:
ndn-l3-tracer.hpp:124
ns3::ndn::Data
ns3::ndn::L3Tracer::Stats::m_outInterests
double m_outInterests
Definition:
ndn-l3-tracer.hpp:123
ns3::ndn::L3Tracer::OutData
virtual void OutData(const Data &, const Face &)=0
ns3::ndn::L3Tracer::Stats::m_inInterests
double m_inInterests
Definition:
ndn-l3-tracer.hpp:122
ns3::ndn::L3Tracer::m_nodePtr
Ptr< Node > m_nodePtr
Definition:
ndn-l3-tracer.hpp:105
ns3::ndn::Interest
ns3::ndn::L3Tracer::InInterests
virtual void InInterests(const Interest &, const Face &)=0
ns3::ndn::L3Tracer::InData
virtual void InData(const Data &, const Face &)=0
ns3::ndn::L3Tracer::PrintHeader
virtual void PrintHeader(std::ostream &os) const =0
Print head of the trace (e.g., for post-processing)
ns3::ndn::L3Tracer::TimedOutInterests
virtual void TimedOutInterests(const nfd::pit::Entry &)=0
ns3::ndn::L3Tracer::OutInterests
virtual void OutInterests(const Interest &, const Face &)=0
ndnSIM
utils
tracers
ndn-l3-tracer.hpp
Generated on Wed Feb 18 2015 16:31:16 for ndnSIM by
1.8.7