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
Namespace List
+
Namespace Members
+
All
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
+
Functions
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
+
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
+
Typedefs
a
b
c
d
e
f
h
i
l
m
n
o
p
q
r
s
t
u
v
Enumerations
+
Enumerator
a
b
c
d
e
f
h
i
k
l
m
n
o
p
q
r
s
u
v
+
Classes
Class List
Class Index
Class Hierarchy
+
Class Members
+
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
~
+
Functions
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
~
+
Variables
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
w
+
Typedefs
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
Enumerations
+
Enumerator
a
d
e
f
i
k
l
n
p
r
s
u
w
+
Related Functions
b
c
d
e
f
g
i
k
l
m
n
o
p
s
v
+
Files
File List
+
File Members
+
All
a
b
c
d
e
f
g
h
i
k
l
m
n
p
r
s
u
v
w
+
Functions
c
f
h
m
r
s
u
w
+
Variables
a
c
d
g
k
l
n
p
r
s
Typedefs
+
Macros
b
d
e
f
i
l
m
n
p
r
s
u
v
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
ndn-content-store.cpp
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
20
#include "
ndn-content-store.hpp
"
21
22
#include "ns3/log.h"
23
#include "ns3/packet.h"
24
25
NS_LOG_COMPONENT_DEFINE(
"ndn.cs.ContentStore"
);
26
27
namespace
ns3
{
28
namespace
ndn
{
29
30
NS_OBJECT_ENSURE_REGISTERED
(
ContentStore
);
31
32
TypeId
33
ContentStore::GetTypeId
(
void
)
34
{
35
static
TypeId tid =
36
TypeId(
"ns3::ndn::ContentStore"
)
37
.SetGroupName(
"Ndn"
)
38
.SetParent<Object>()
39
40
.AddTraceSource(
"CacheHits"
,
"Trace called every time there is a cache hit"
,
41
MakeTraceSourceAccessor(&
ContentStore::m_cacheHitsTrace
),
42
"ns3::ndn::ContentStore::CacheHitsCallback"
)
43
44
.AddTraceSource(
"CacheMisses"
,
"Trace called every time there is a cache miss"
,
45
MakeTraceSourceAccessor(&
ContentStore::m_cacheMissesTrace
),
46
"ns3::ndn::ContentStrore::CacheMissesCallback"
);
47
48
return
tid;
49
}
50
51
ContentStore::~ContentStore
()
52
{
53
}
54
55
namespace
cs {
56
58
59
Entry::Entry(Ptr<ContentStore> cs, shared_ptr<const Data> data)
60
: m_cs(cs)
61
, m_data(data)
62
{
63
}
64
65
const
Name
&
66
Entry::GetName
()
const
67
{
68
return
m_data->getName();
69
}
70
71
shared_ptr<const Data>
72
Entry::GetData
()
const
73
{
74
return
m_data;
75
}
76
77
Ptr<ContentStore>
78
Entry::GetContentStore
()
79
{
80
return
m_cs;
81
}
82
83
}
// namespace cs
84
}
// namespace ndn
85
}
// namespace ns3
ndn
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-strategy-choice-helper.hpp:34
ns3::ndn::cs::Entry::GetName
const Name & GetName() const
Get prefix of the stored entry.
Definition:
ndn-content-store.cpp:66
ns3::ndn::NS_OBJECT_ENSURE_REGISTERED
NS_OBJECT_ENSURE_REGISTERED(ContentStore)
ns3::ndn::ContentStore::m_cacheMissesTrace
TracedCallback< shared_ptr< const Interest > > m_cacheMissesTrace
trace of cache misses
Definition:
ndn-content-store.hpp:189
ns3::ndn::cs::Entry::GetData
shared_ptr< const Data > GetData() const
Get Data of the stored entry.
Definition:
ndn-content-store.cpp:72
ns3::ndn::Name
Name
Definition:
ndn-common.cpp:25
ndn-content-store.hpp
ns3
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
content-store-impl.cpp:38
ns3::ndn::ContentStore::m_cacheHitsTrace
TracedCallback< shared_ptr< const Interest >, shared_ptr< const Data > > m_cacheHitsTrace
trace of cache hits
Definition:
ndn-content-store.hpp:187
ns3::ndn::ContentStore::~ContentStore
virtual ~ContentStore()
Virtual destructor.
Definition:
ndn-content-store.cpp:51
ContentStore
ndn cs ContentStore
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-content-store.cpp:25
ns3::ndn::cs::Entry::GetContentStore
Ptr< ContentStore > GetContentStore()
Get pointer to access store, to which this entry is added.
Definition:
ndn-content-store.cpp:78
ns3::ndn::ContentStore::GetTypeId
static TypeId GetTypeId()
Interface ID.
Definition:
ndn-content-store.cpp:33
ndnSIM
model
cs
ndn-content-store.cpp
Generated on Wed Jan 11 2017 18:17:13 for ndnSIM by
1.8.13