Ndn application for sending out Interest packets (window-based) More...
#include <ndn-consumer-window.hpp>
Public Types | |
typedef std::function< void(double)> | WindowTraceCallback |
Public Types inherited from ns3::ndn::Consumer | |
typedef void(* | LastRetransmittedInterestDataDelayCallback) (Ptr< App > app, uint32_t seqno, Time delay, int32_t hopCount) |
typedef void(* | FirstInterestDataDelayCallback) (Ptr< App > app, uint32_t seqno, Time delay, uint32_t retxCount, int32_t hopCount) |
Public Types inherited from ns3::ndn::App | |
typedef void(* | InterestTraceCallback) (shared_ptr< const Interest >, Ptr< App >, shared_ptr< Face >) |
typedef void(* | DataTraceCallback) (shared_ptr< const Data >, Ptr< App >, shared_ptr< Face >) |
typedef void(* | NackTraceCallback) (shared_ptr< const lp::Nack >, Ptr< App >, shared_ptr< Face >) |
Public Member Functions | |
ConsumerWindow () | |
Default constructor. More... | |
virtual void | OnData (shared_ptr< const Data > contentObject) |
Method that will be called every time new Data arrives. More... | |
virtual void | OnTimeout (uint32_t sequenceNumber) |
Timeout event. More... | |
virtual void | WillSendOutInterest (uint32_t sequenceNumber) |
An event that is fired just before an Interest packet is actually send out (send is inevitable) More... | |
Public Member Functions inherited from ns3::ndn::Consumer | |
Consumer () | |
Default constructor Sets up randomizer function and packet sequence number. More... | |
virtual | ~Consumer () |
virtual void | OnNack (shared_ptr< const lp::Nack > nack) |
Method that will be called every time new Nack arrives. More... | |
void | SendPacket () |
Actually send packet. More... | |
Public Member Functions inherited from ns3::ndn::App | |
App () | |
Default constructor. More... | |
virtual | ~App () |
uint32_t | GetId () const |
Get application ID (ID of applications face) More... | |
virtual void | OnInterest (shared_ptr< const Interest > interest) |
Method that will be called every time new Interest arrives. More... | |
Static Public Member Functions | |
static TypeId | GetTypeId () |
Static Public Member Functions inherited from ns3::ndn::Consumer | |
static TypeId | GetTypeId () |
Static Public Member Functions inherited from ns3::ndn::App | |
static TypeId | GetTypeId () |
Protected Member Functions | |
virtual void | ScheduleNextPacket () |
Constructs the Interest packet and sends it using a callback to the underlying NDN protocol. More... | |
Protected Member Functions inherited from ns3::ndn::Consumer | |
virtual void | StartApplication () |
Called at time specified by Start. More... | |
virtual void | StopApplication () |
Called at time specified by Stop. More... | |
void | CheckRetxTimeout () |
Checks if the packet need to be retransmitted becuase of retransmission timer expiration. More... | |
void | SetRetxTimer (Time retxTimer) |
Modifies the frequency of checking the retransmission timeouts. More... | |
Time | GetRetxTimer () const |
Returns the frequency of checking the retransmission timeouts. More... | |
Protected Member Functions inherited from ns3::ndn::App | |
virtual void | DoInitialize () |
virtual void | DoDispose () |
Protected Attributes | |
uint32_t | m_payloadSize |
double | m_maxSize |
uint32_t | m_initialWindow |
bool | m_setInitialWindowOnTimeout |
TracedValue< double > | m_window |
TracedValue< uint32_t > | m_inFlight |
Protected Attributes inherited from ns3::ndn::Consumer | |
Ptr< UniformRandomVariable > | m_rand |
nonce generator More... | |
uint32_t | m_seq |
currently requested sequence number More... | |
uint32_t | m_seqMax |
maximum number of sequence number More... | |
EventId | m_sendEvent |
EventId of pending "send packet" event. More... | |
Time | m_retxTimer |
Currently estimated retransmission timer. More... | |
EventId | m_retxEvent |
Event to check whether or not retransmission should be performed. More... | |
Ptr< RttEstimator > | m_rtt |
RTT estimator. More... | |
Time | m_offTime |
Time interval between packets. More... | |
Name | m_interestName |
NDN Name of the Interest (use Name) More... | |
Time | m_interestLifeTime |
LifeTime for interest packet. More... | |
Protected Attributes inherited from ns3::ndn::App | |
bool | m_active |
Flag to indicate that application is active (set by StartApplication and StopApplication) More... | |
shared_ptr< Face > | m_face |
AppLinkService * | m_appLink |
uint32_t | m_appId |
TracedCallback< shared_ptr< const Interest >, Ptr< App >, shared_ptr< Face > > | m_receivedInterests |
App-level trace of received Interests. More... | |
TracedCallback< shared_ptr< const Data >, Ptr< App >, shared_ptr< Face > > | m_receivedDatas |
App-level trace of received Data. More... | |
TracedCallback< shared_ptr< const lp::Nack >, Ptr< App >, shared_ptr< Face > > | m_receivedNacks |
App-level trace of received Nacks. More... | |
TracedCallback< shared_ptr< const Interest >, Ptr< App >, shared_ptr< Face > > | m_transmittedInterests |
App-level trace of transmitted Interests. More... | |
TracedCallback< shared_ptr< const Data >, Ptr< App >, shared_ptr< Face > > | m_transmittedDatas |
App-level trace of transmitted Data. More... | |
TracedCallback< shared_ptr< const lp::Nack >, Ptr< App >, shared_ptr< Face > > | m_transmittedNacks |
App-level trace of transmitted Nacks. More... | |
Ndn application for sending out Interest packets (window-based)
!!! ATTENTION !!! This is highly experimental and relies on experimental features of the simulator. Behavior may be unpredictable if used incorrectly.
ns3::ndn::ConsumerWindow is accessible through the following paths with Config::Set and Config::Connect:
Size of this type is 800 bytes (on a 64-bit architecture).
Definition at line 39 of file ndn-consumer-window.hpp.
typedef std::function<void(double)> ns3::ndn::ConsumerWindow::WindowTraceCallback |
Definition at line 60 of file ndn-consumer-window.hpp.
ns3::ndn::ConsumerWindow::ConsumerWindow | ( | ) |
Default constructor.
Definition at line 86 of file ndn-consumer-window.cpp.
References m_initialWindow, m_maxSize, m_payloadSize, ns3::ndn::Consumer::m_seqMax, m_window, and nonstd::span_lite::size().
|
static |
Definition at line 39 of file ndn-consumer-window.cpp.
References m_inFlight, m_setInitialWindowOnTimeout, and m_window.
|
virtual |
Method that will be called every time new Data arrives.
Reimplemented from ns3::ndn::Consumer.
Reimplemented in ns3::ndn::ConsumerPcon.
Definition at line 186 of file ndn-consumer-window.cpp.
References m_inFlight, m_window, ns3::ndn::Consumer::OnData(), and ScheduleNextPacket().
|
virtual |
Timeout event.
sequenceNumber | time outed sequence number |
Reimplemented from ns3::ndn::Consumer.
Reimplemented in ns3::ndn::ConsumerPcon.
Definition at line 200 of file ndn-consumer-window.cpp.
References m_inFlight, m_initialWindow, m_setInitialWindowOnTimeout, m_window, and ns3::ndn::Consumer::OnTimeout().
|
virtual |
An event that is fired just before an Interest packet is actually send out (send is inevitable)
The reason for "before" even is that in certain cases (when it is possible to satisfy from the local cache), the send call will immediately return data, and if "after" even was used, this after would be called after all processing of incoming data, potentially producing unexpected results.
Reimplemented from ns3::ndn::Consumer.
Definition at line 215 of file ndn-consumer-window.cpp.
References m_inFlight, and ns3::ndn::Consumer::WillSendOutInterest().
|
protectedvirtual |
Constructs the Interest packet and sends it using a callback to the underlying NDN protocol.
Implements ns3::ndn::Consumer.
Definition at line 156 of file ndn-consumer-window.cpp.
References m_inFlight, ns3::ndn::Consumer::m_rtt, ns3::ndn::Consumer::m_sendEvent, m_window, and ns3::ndn::Consumer::SendPacket().
Referenced by OnData(), and ns3::ndn::ConsumerPcon::OnData().
|
protected |
Definition at line 96 of file ndn-consumer-window.hpp.
Referenced by ConsumerWindow().
|
protected |
Definition at line 97 of file ndn-consumer-window.hpp.
Referenced by ConsumerWindow().
|
protected |
Definition at line 99 of file ndn-consumer-window.hpp.
Referenced by ConsumerWindow(), OnTimeout(), and ns3::ndn::ConsumerPcon::OnTimeout().
|
protected |
Definition at line 100 of file ndn-consumer-window.hpp.
Referenced by GetTypeId(), and OnTimeout().
|
protected |
Definition at line 102 of file ndn-consumer-window.hpp.
Referenced by ConsumerWindow(), GetTypeId(), OnData(), ns3::ndn::ConsumerPcon::OnData(), OnTimeout(), ns3::ndn::ConsumerPcon::OnTimeout(), and ScheduleNextPacket().
|
protected |
Definition at line 103 of file ndn-consumer-window.hpp.
Referenced by GetTypeId(), OnData(), ns3::ndn::ConsumerPcon::OnData(), OnTimeout(), ns3::ndn::ConsumerPcon::OnTimeout(), ScheduleNextPacket(), and WillSendOutInterest().