NS-3 based Named Data Networking (NDN) simulator
ndnSIM: NDN, CCN, CCNx, content centric networks
API Documentation
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Groups
Pages
callback-based-app.h
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
2
/*
3
* Copyright (c) 2013, Regents of the University of California
4
* Alexander Afanasyev
5
* Zhenkai Zhu
6
*
7
* GNU v3.0 license, See the LICENSE file for more information
8
*
9
* Author: Alexander Afanasyev <alexander.afanasyev@ucla.edu>
10
*/
11
12
#ifndef NDN_CALLBACK_BASED_APP_H
13
#define NDN_CALLBACK_BASED_APP_H
14
15
#include "ns3/application.h"
16
#include "ns3/ptr.h"
17
#include "ns3/callback.h"
18
19
namespace
ns3 {
20
25
class
CallbackBasedApp
:
public
Application
26
{
27
public
:
28
static
TypeId GetTypeId ();
29
33
CallbackBasedApp
();
34
38
virtual
39
~CallbackBasedApp
();
40
44
void
45
SetOnStartCallback
(Callback<
void
, Ptr<Application> > onStart);
46
50
void
51
SetOnStopCallback
(Callback<
void
, Ptr<Application> > onStart);
52
53
protected
:
54
// inherited from Application base class. Originally they were private
55
virtual
void
56
StartApplication
();
57
58
virtual
void
59
StopApplication
();
60
61
private
:
62
Callback< void, Ptr<Application> > m_onStart;
63
Callback< void, Ptr<Application> > m_onStop;
64
};
65
66
}
// ns3
67
68
#endif // NDN_CALLBACK_BASED_APP_H
ns3::CallbackBasedApp::StartApplication
virtual void StartApplication()
Called at time specified by Start.
Definition:
callback-based-app.cc:64
ns3::CallbackBasedApp::CallbackBasedApp
CallbackBasedApp()
Default constructor.
Definition:
callback-based-app.cc:43
ns3::CallbackBasedApp::SetOnStopCallback
void SetOnStopCallback(Callback< void, Ptr< Application > > onStart)
Define callback that will be fired when application need to stop its work.
Definition:
callback-based-app.cc:58
ns3::CallbackBasedApp::~CallbackBasedApp
virtual ~CallbackBasedApp()
Virtual destructor.
Definition:
callback-based-app.cc:47
ns3::CallbackBasedApp::StopApplication
virtual void StopApplication()
Called at time specified by Stop.
Definition:
callback-based-app.cc:72
ns3::CallbackBasedApp::SetOnStartCallback
void SetOnStartCallback(Callback< void, Ptr< Application > > onStart)
Define callback that will be fired when application need to start its work.
Definition:
callback-based-app.cc:52
ns3::CallbackBasedApp
A meta application that can be used to create custom apps within Python bindings. ...
Definition:
callback-based-app.h:25
ndnSIM
apps
callback-based-app.h
Generated on Mon Jan 19 2015 11:27:03 for ndnSIM by
1.8.7