22 #include "ns3/assert.h" 
   23 #include "ns3/packet.h" 
   28 NS_LOG_COMPONENT_DEFINE(
"ndn.App");
 
   38   static TypeId tid = TypeId(
"ns3::ndn::App")
 
   40                         .SetParent<Application>()
 
   41                         .AddConstructor<App>()
 
   43                         .AddTraceSource(
"ReceivedInterests", 
"ReceivedInterests",
 
   46                         .AddTraceSource(
"ReceivedDatas", 
"ReceivedDatas",
 
   49                         .AddTraceSource(
"TransmittedInterests", 
"TransmittedInterests",
 
   52                         .AddTraceSource(
"TransmittedDatas", 
"TransmittedDatas",
 
   70   NS_LOG_FUNCTION_NOARGS();
 
   75   Application::DoDispose();
 
   90   NS_LOG_FUNCTION(
this << interest);
 
   97   NS_LOG_FUNCTION(
this << data);
 
  105   NS_LOG_FUNCTION_NOARGS();
 
  110   NS_ASSERT_MSG(GetNode()->GetObject<L3Protocol>() != 0,
 
  111                 "Ndn stack should be installed on the node " << GetNode());
 
  114   m_face = std::make_shared<AppFace>(
this);
 
  123   NS_LOG_FUNCTION_NOARGS();
 
virtual void StopApplication()
Called at time specified by Stop. 
 
ndn App
Copyright (c) 2011-2015 Regents of the University of California. 
 
NS_OBJECT_ENSURE_REGISTERED(ContentStore)
 
virtual void StartApplication()
Called at time specified by Start. 
 
TracedCallback< shared_ptr< const Interest >, Ptr< App >, shared_ptr< Face > > m_receivedInterests
communicates 
 
static TypeId GetTypeId()
 
virtual void OnInterest(shared_ptr< const Interest > interest)
Method that will be called every time new Interest arrives. 
 
virtual void DoDispose()
Do cleanup when application is destroyed. 
 
TracedCallback< shared_ptr< const Interest >, Ptr< App >, shared_ptr< Face > > m_transmittedInterests
App-level trace of transmitted Interests. 
 
shared_ptr< Face > m_face
and StopApplication) 
 
TracedCallback< shared_ptr< const Data >, Ptr< App >, shared_ptr< Face > > m_transmittedDatas
App-level trace of transmitted Data. 
 
Implementation network-layer of NDN stack. 
 
App()
Default constructor. 
 
TracedCallback< shared_ptr< const Data >, Ptr< App >, shared_ptr< Face > > m_receivedDatas
App-level trace of received Data. 
 
bool m_active
Flag to indicate that application is active (set by StartApplication. 
 
virtual void OnData(shared_ptr< const Data > data)
Method that will be called every time new Data arrives. 
 
uint32_t GetId() const 
Get application ID (ID of applications face)