Base class that all NDN applications should be derived from. More...
#include <ndn-app.hpp>


Public Member Functions | |
| 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... | |
| virtual void | OnData (shared_ptr< const Data > data) | 
| Method that will be called every time new Data arrives.  More... | |
Static Public Member Functions | |
| static TypeId | GetTypeId () | 
Protected Member Functions | |
| virtual void | DoDispose () | 
| Do cleanup when application is destroyed.  More... | |
| virtual void | StartApplication () | 
| Called at time specified by Start.  More... | |
| virtual void | StopApplication () | 
| Called at time specified by Stop.  More... | |
Protected Attributes | |
| bool | m_active | 
| Flag to indicate that application is active (set by StartApplication.  More... | |
| shared_ptr< Face > | m_face | 
| and StopApplication)  More... | |
| TracedCallback< shared_ptr < const Interest >, Ptr< App > , shared_ptr< Face > >  | m_receivedInterests | 
| communicates  More... | |
| TracedCallback< shared_ptr < const Data >, Ptr< App > , shared_ptr< Face > >  | m_receivedDatas | 
| App-level trace of received Data.  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... | |
Base class that all NDN applications should be derived from.
The class implements virtual calls onInterest, onNack, and onData
ns3::ndn::App is accessible through the following paths with Config::Set and Config::Connect:
No Attributes are defined for this type.
 
Definition at line 47 of file ndn-app.hpp.
| ns3::ndn::App::App | ( | ) | 
Default constructor.
Definition at line 57 of file ndn-app.cpp.
      
  | 
  virtual | 
Definition at line 63 of file ndn-app.cpp.
      
  | 
  protectedvirtual | 
Do cleanup when application is destroyed.
Definition at line 68 of file ndn-app.cpp.
| uint32_t ns3::ndn::App::GetId | ( | ) | const | 
Get application ID (ID of applications face)
Definition at line 79 of file ndn-app.cpp.
References m_face.
Referenced by ns3::ndn::Producer::OnInterest().
      
  | 
  static | 
Definition at line 36 of file ndn-app.cpp.
References m_receivedDatas, m_receivedInterests, m_transmittedDatas, and m_transmittedInterests.
      
  | 
  virtual | 
Method that will be called every time new Data arrives.
| contentObject | Data header | 
| payload | payload (potentially virtual) of the Data packet (may include packet tags of original packet) | 
Reimplemented in ns3::ndn::Consumer, and ns3::ndn::ConsumerWindow.
Definition at line 95 of file ndn-app.cpp.
References m_face, and m_receivedDatas.
Referenced by ns3::ndn::Consumer::OnData(), and ns3::ndn::AppFace::sendData().
      
  | 
  virtual | 
Method that will be called every time new Interest arrives.
| interest | Interest header | 
| packet | "Payload" of the interests packet. The actual payload should be zero, but packet itself may be useful to get packet tags | 
Reimplemented in ns3::ndn::Producer.
Definition at line 88 of file ndn-app.cpp.
References m_face, and m_receivedInterests.
Referenced by ns3::ndn::Producer::OnInterest(), and ns3::ndn::AppFace::sendInterest().
      
  | 
  protectedvirtual | 
Called at time specified by Start.
Reimplemented in ns3::ndn::Consumer, and ns3::ndn::Producer.
Definition at line 103 of file ndn-app.cpp.
References m_active, and m_face.
Referenced by ns3::ndn::Producer::StartApplication(), and ns3::ndn::Consumer::StartApplication().
      
  | 
  protectedvirtual | 
Called at time specified by Stop.
Reimplemented in ns3::ndn::Consumer, and ns3::ndn::Producer.
Definition at line 121 of file ndn-app.cpp.
References m_active, and m_face.
Referenced by ns3::ndn::Producer::StopApplication(), and ns3::ndn::Consumer::StopApplication().
      
  | 
  protected | 
Flag to indicate that application is active (set by StartApplication.
Definition at line 98 of file ndn-app.hpp.
Referenced by ns3::ndn::Consumer::OnData(), ns3::ndn::Producer::OnInterest(), ns3::ndn::ConsumerZipfMandelbrot::SendPacket(), ns3::ndn::Consumer::SendPacket(), StartApplication(), and StopApplication().
      
  | 
  protected | 
and StopApplication)
automatically created application face through which application
Definition at line 101 of file ndn-app.hpp.
Referenced by GetId(), OnData(), ns3::ndn::Producer::OnInterest(), OnInterest(), ns3::ndn::ConsumerZipfMandelbrot::SendPacket(), ns3::ndn::Consumer::SendPacket(), ns3::ndn::Producer::StartApplication(), StartApplication(), and StopApplication().
      
  | 
  protected | 
App-level trace of received Data.
Definition at line 108 of file ndn-app.hpp.
Referenced by GetTypeId(), and OnData().
      
  | 
  protected | 
communicates
App-level trace of received Interests
Definition at line 105 of file ndn-app.hpp.
Referenced by GetTypeId(), and OnInterest().
      
  | 
  protected | 
App-level trace of transmitted Data.
Definition at line 114 of file ndn-app.hpp.
Referenced by GetTypeId(), and ns3::ndn::Producer::OnInterest().
      
  | 
  protected | 
App-level trace of transmitted Interests.
Definition at line 111 of file ndn-app.hpp.
Referenced by GetTypeId(), ns3::ndn::ConsumerZipfMandelbrot::SendPacket(), and ns3::ndn::Consumer::SendPacket().