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-consumer-window.hpp
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
20
#ifndef NDN_CONSUMER_WINDOW_H
21
#define NDN_CONSUMER_WINDOW_H
22
23
#include "ns3/ndnSIM/model/ndn-common.hpp"
24
25
#include "
ndn-consumer.hpp
"
26
#include "ns3/traced-value.h"
27
28
namespace
ns3 {
29
namespace
ndn {
30
39
class
ConsumerWindow
:
public
Consumer
{
40
public
:
41
static
TypeId
42
GetTypeId
();
43
47
ConsumerWindow
();
48
49
// From App
50
virtual
void
51
OnData
(shared_ptr<const Data> contentObject);
52
53
virtual
void
54
OnTimeout
(uint32_t sequenceNumber);
55
56
virtual
void
57
WillSendOutInterest
(uint32_t sequenceNumber);
58
59
protected
:
64
virtual
void
65
ScheduleNextPacket
();
66
67
private
:
68
virtual
void
69
SetWindow(uint32_t window);
70
71
uint32_t
72
GetWindow()
const
;
73
74
virtual
void
75
SetPayloadSize(uint32_t payload);
76
77
uint32_t
78
GetPayloadSize()
const
;
79
80
double
81
GetMaxSize()
const
;
82
83
void
84
SetMaxSize(
double
size);
85
86
uint32_t
87
GetSeqMax()
const
;
88
89
void
90
SetSeqMax(uint32_t seqMax);
91
92
private
:
93
uint32_t m_payloadSize;
// expected payload size
94
double
m_maxSize;
// max size to request
95
96
uint32_t m_initialWindow;
97
bool
m_setInitialWindowOnTimeout;
98
99
TracedValue<uint32_t> m_window;
100
TracedValue<uint32_t> m_inFlight;
101
};
102
103
}
// namespace ndn
104
}
// namespace ns3
105
106
#endif
ndn-consumer.hpp
ns3::ndn::ConsumerWindow
Ndn application for sending out Interest packets (window-based)
Definition:
ndn-consumer-window.hpp:39
ns3::ndn::ConsumerWindow::GetTypeId
static TypeId GetTypeId()
Definition:
ndn-consumer-window.cpp:38
ns3::ndn::ConsumerWindow::OnTimeout
virtual void OnTimeout(uint32_t sequenceNumber)
Timeout event.
Definition:
ndn-consumer-window.cpp:197
ns3::ndn::ConsumerWindow::ScheduleNextPacket
virtual void ScheduleNextPacket()
Constructs the Interest packet and sends it using a callback to the underlying NDN protocol...
Definition:
ndn-consumer-window.cpp:153
ns3::ndn::Consumer
NDN application for sending out Interest packets.
Definition:
ndn-consumer.hpp:50
ns3::ndn::ConsumerWindow::ConsumerWindow
ConsumerWindow()
Default constructor.
Definition:
ndn-consumer-window.cpp:83
ns3::ndn::ConsumerWindow::OnData
virtual void OnData(shared_ptr< const Data > contentObject)
Method that will be called every time new Data arrives.
Definition:
ndn-consumer-window.cpp:183
ns3::ndn::ConsumerWindow::WillSendOutInterest
virtual void WillSendOutInterest(uint32_t sequenceNumber)
An event that is fired just before an Interest packet is actually send out (send is inevitable) ...
Definition:
ndn-consumer-window.cpp:212
ndnSIM
apps
ndn-consumer-window.hpp
Generated on Wed Feb 18 2015 16:31:16 for ndnSIM by
1.8.7