23 #include "ns3/ndnSIM/model/ndn-common.hpp" 24 #include "ns3/ndnSIM/model/ndn-app-face.hpp" 26 #include "ns3/application.h" 28 #include "ns3/callback.h" 29 #include "ns3/traced-callback.h" 47 class App :
public Application {
72 OnInterest(shared_ptr<const Interest> interest);
81 OnData(shared_ptr<const Data> data);
106 TracedCallback<shared_ptr<const Interest>, Ptr<App>, shared_ptr<Face>>
109 TracedCallback<shared_ptr<const Data>, Ptr<App>, shared_ptr<Face>>
112 TracedCallback<shared_ptr<const Interest>, Ptr<App>, shared_ptr<Face>>
115 TracedCallback<shared_ptr<const Data>, Ptr<App>, shared_ptr<Face>>
Copyright (c) 2011-2015 Regents of the University of California.
virtual void StopApplication()
Called at time specified by Stop.
void(* InterestTraceCallback)(shared_ptr< const Interest >, Ptr< App >, shared_ptr< Face >)
virtual void DoInitialize()
virtual void StartApplication()
Called at time specified by Start.
shared_ptr< AppFace > m_face
automatically created application face through which application communicates
TracedCallback< shared_ptr< const Interest >, Ptr< App >, shared_ptr< Face > > m_receivedInterests
App-level trace of received Interests.
static TypeId GetTypeId()
virtual void OnInterest(shared_ptr< const Interest > interest)
Method that will be called every time new Interest arrives.
Copyright (c) 2011-2015 Regents of the University of California.
TracedCallback< shared_ptr< const Interest >, Ptr< App >, shared_ptr< Face > > m_transmittedInterests
App-level trace of transmitted Interests.
void(* DataTraceCallback)(shared_ptr< const Data >, Ptr< App >, shared_ptr< Face >)
TracedCallback< shared_ptr< const Data >, Ptr< App >, shared_ptr< Face > > m_transmittedDatas
App-level trace of transmitted Data.
Base class that all NDN applications should be derived from.
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 and StopApplication) ...
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)