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
ndn-consumer-zipf-mandelbrot.hpp
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
22
#ifndef NDN_CONSUMER_ZIPF_MANDELBROT_H_
23
#define NDN_CONSUMER_ZIPF_MANDELBROT_H_
24
25
#include "ns3/ndnSIM/model/ndn-common.hpp"
26
27
#include "
ndn-consumer.hpp
"
28
#include "
ndn-consumer-cbr.hpp
"
29
30
#include "ns3/ptr.h"
31
#include "ns3/log.h"
32
#include "ns3/simulator.h"
33
#include "ns3/packet.h"
34
#include "ns3/callback.h"
35
#include "ns3/string.h"
36
#include "ns3/uinteger.h"
37
#include "ns3/double.h"
38
#include "ns3/random-variable-stream.h"
39
40
namespace
ns3
{
41
namespace
ndn
{
42
51
class
ConsumerZipfMandelbrot
:
public
ConsumerCbr
{
52
public
:
53
static
TypeId
54
GetTypeId
();
55
61
ConsumerZipfMandelbrot
();
62
virtual
~ConsumerZipfMandelbrot
();
63
64
virtual
void
65
SendPacket
();
66
uint32_t
67
GetNextSeq
();
68
69
protected
:
70
virtual
void
71
ScheduleNextPacket
();
72
73
private
:
74
void
75
SetNumberOfContents(uint32_t numOfContents);
76
77
uint32_t
78
GetNumberOfContents()
const
;
79
80
void
81
SetQ(
double
q);
82
83
double
84
GetQ()
const
;
85
86
void
87
SetS(
double
s);
88
89
double
90
GetS()
const
;
91
92
private
:
93
uint32_t m_N;
// number of the contents
94
double
m_q;
// q in (k+q)^s
95
double
m_s;
// s in (k+q)^s
96
std::vector<double> m_Pcum;
// cumulative probability
97
98
Ptr<UniformRandomVariable> m_seqRng;
// RNG
99
};
100
101
}
/* namespace ndn */
102
}
/* namespace ns3 */
103
#endif
/* NDN_CONSUMER_ZIPF_MANDELBROT_H_ */
ndn
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-strategy-choice-helper.hpp:34
ndn-consumer.hpp
ns3::ndn::ConsumerZipfMandelbrot::SendPacket
virtual void SendPacket()
Definition:
ndn-consumer-zipf-mandelbrot.cpp:129
ns3::ndn::ConsumerCbr
Ndn application for sending out Interest packets at a "constant" rate (Poisson process) ...
Definition:
ndn-consumer-cbr.hpp:34
ns3::ndn::ConsumerZipfMandelbrot::ScheduleNextPacket
virtual void ScheduleNextPacket()
Constructs the Interest packet and sends it using a callback to the underlying NDN protocol...
Definition:
ndn-consumer-zipf-mandelbrot.cpp:227
ndn-consumer-cbr.hpp
ns3
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
content-store-impl.cpp:38
ns3::ndn::ConsumerZipfMandelbrot::~ConsumerZipfMandelbrot
virtual ~ConsumerZipfMandelbrot()
Definition:
ndn-consumer-zipf-mandelbrot.cpp:72
ns3::ndn::ConsumerZipfMandelbrot::ConsumerZipfMandelbrot
ConsumerZipfMandelbrot()
Default constructor Sets up randomized Number Generator (RNG) Note: m_seq of its parent class Consume...
Definition:
ndn-consumer-zipf-mandelbrot.cpp:63
ns3::ndn::ConsumerZipfMandelbrot
NDN app requesting contents following Zipf-Mandelbrot Distbituion.
Definition:
ndn-consumer-zipf-mandelbrot.hpp:51
ns3::ndn::ConsumerZipfMandelbrot::GetTypeId
static TypeId GetTypeId()
Definition:
ndn-consumer-zipf-mandelbrot.cpp:37
ns3::ndn::ConsumerZipfMandelbrot::GetNextSeq
uint32_t GetNextSeq()
Definition:
ndn-consumer-zipf-mandelbrot.cpp:202
ndnSIM
apps
ndn-consumer-zipf-mandelbrot.hpp
Generated on Tue Feb 23 2016 22:18:42 for ndnSIM by
1.8.11