author | Gustavo J. A. M. Carneiro <gjc@inescporto.pt> |
Fri, 11 Jul 2008 18:39:19 +0100 | |
changeset 3416 | 926ccb845111 |
parent 3264 | 7824a11c07fa |
permissions | -rw-r--r-- |
346
4a76f247e7dc
Add random number files, base class Application
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
1 |
/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ |
4a76f247e7dc
Add random number files, base class Application
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
2 |
/* |
4a76f247e7dc
Add random number files, base class Application
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
3 |
* Copyright (c) 2006 Georgia Tech Research Corporation |
4a76f247e7dc
Add random number files, base class Application
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
4 |
* |
4a76f247e7dc
Add random number files, base class Application
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
5 |
* This program is free software; you can redistribute it and/or modify |
4a76f247e7dc
Add random number files, base class Application
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
6 |
* it under the terms of the GNU General Public License version 2 as |
4a76f247e7dc
Add random number files, base class Application
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation; |
4a76f247e7dc
Add random number files, base class Application
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
8 |
* |
4a76f247e7dc
Add random number files, base class Application
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
9 |
* This program is distributed in the hope that it will be useful, |
4a76f247e7dc
Add random number files, base class Application
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
4a76f247e7dc
Add random number files, base class Application
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
4a76f247e7dc
Add random number files, base class Application
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
12 |
* GNU General Public License for more details. |
4a76f247e7dc
Add random number files, base class Application
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
13 |
* |
4a76f247e7dc
Add random number files, base class Application
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
14 |
* You should have received a copy of the GNU General Public License |
4a76f247e7dc
Add random number files, base class Application
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
15 |
* along with this program; if not, write to the Free Software |
4a76f247e7dc
Add random number files, base class Application
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
16 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
4a76f247e7dc
Add random number files, base class Application
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
17 |
* |
4a76f247e7dc
Add random number files, base class Application
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
18 |
* Author: George F. Riley<riley@ece.gatech.edu> |
4a76f247e7dc
Add random number files, base class Application
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
19 |
*/ |
4a76f247e7dc
Add random number files, base class Application
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
20 |
|
4a76f247e7dc
Add random number files, base class Application
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
21 |
#ifndef __APPLICATION_H__ |
4a76f247e7dc
Add random number files, base class Application
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
22 |
#define __APPLICATION_H__ |
4a76f247e7dc
Add random number files, base class Application
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
23 |
|
4a76f247e7dc
Add random number files, base class Application
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
24 |
#include "ns3/event-id.h" |
4a76f247e7dc
Add random number files, base class Application
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
25 |
#include "ns3/nstime.h" |
498
5d5fe14d5751
make capabilities and sockets refcounted
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
497
diff
changeset
|
26 |
#include "ns3/object.h" |
593
90cf12cb4ab7
merge with trunk
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
538
diff
changeset
|
27 |
#include "ns3/ptr.h" |
729
b5e744285e92
rename i-node to node
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
728
diff
changeset
|
28 |
#include "ns3/node.h" |
346
4a76f247e7dc
Add random number files, base class Application
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
29 |
|
4a76f247e7dc
Add random number files, base class Application
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
30 |
namespace ns3 { |
4a76f247e7dc
Add random number files, base class Application
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
31 |
|
728
95c426b1cb60
rename INode to Node
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
607
diff
changeset
|
32 |
class Node; |
359
91b7ad7fa784
OnOffApplication functioning; some Node class cleanup
Tom Henderson <tomh@tomh.org>
parents:
346
diff
changeset
|
33 |
class RandomVariable; |
593
90cf12cb4ab7
merge with trunk
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
538
diff
changeset
|
34 |
|
538
3cc417842b5f
Added/fixed some doxygen
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
524
diff
changeset
|
35 |
/** |
3264 | 36 |
* \addtogroup applications Applications |
37 |
* |
|
38 |
* Class ns3::Application can be used as a base class for ns3 applications. |
|
39 |
* Applications are associated with individual nodes. Each node |
|
40 |
* holds a list of references (smart pointers) to its applications. |
|
538
3cc417842b5f
Added/fixed some doxygen
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
524
diff
changeset
|
41 |
* |
3264 | 42 |
* Conceptually, an application has zero or more ns3::Socket |
538
3cc417842b5f
Added/fixed some doxygen
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
524
diff
changeset
|
43 |
* objects associated with it, that are created using the Socket |
3cc417842b5f
Added/fixed some doxygen
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
524
diff
changeset
|
44 |
* creation API of the Kernel capability. The Socket object |
3cc417842b5f
Added/fixed some doxygen
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
524
diff
changeset
|
45 |
* API is modeled after the |
3cc417842b5f
Added/fixed some doxygen
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
524
diff
changeset
|
46 |
* well-known BSD sockets interface, although it is somewhat |
3cc417842b5f
Added/fixed some doxygen
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
524
diff
changeset
|
47 |
* simplified for use with ns3. Further, any socket call that |
3cc417842b5f
Added/fixed some doxygen
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
524
diff
changeset
|
48 |
* would normally "block" in normal sockets will return immediately |
3cc417842b5f
Added/fixed some doxygen
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
524
diff
changeset
|
49 |
* in ns3. A set of "upcalls" are defined that will be called when |
3cc417842b5f
Added/fixed some doxygen
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
524
diff
changeset
|
50 |
* the previous blocking call would normally exit. THis is documented |
3cc417842b5f
Added/fixed some doxygen
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
524
diff
changeset
|
51 |
* in more detail Socket class in socket.h. |
3264 | 52 |
* |
53 |
* The main purpose of the base class application public API is to |
|
54 |
* provide a uniform way to start and stop applications. |
|
55 |
*/ |
|
56 |
||
57 |
/** |
|
58 |
* \brief The base class for all ns3 applications |
|
59 |
* |
|
538
3cc417842b5f
Added/fixed some doxygen
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
524
diff
changeset
|
60 |
*/ |
498
5d5fe14d5751
make capabilities and sockets refcounted
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
497
diff
changeset
|
61 |
class Application : public Object |
5d5fe14d5751
make capabilities and sockets refcounted
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
497
diff
changeset
|
62 |
{ |
346
4a76f247e7dc
Add random number files, base class Application
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
63 |
public: |
2494
1c69ea12779c
port Applications to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
729
diff
changeset
|
64 |
static TypeId GetTypeId (void); |
3174
efeb6e5c276d
Make Application::Start/Stop times relative, Simulator::StopAt(time) renamed to Simulator::Stop(time) and time also made relative, to improve consistency of the API which uses relative times everywhere else. Closes bug #191.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
2725
diff
changeset
|
65 |
Application (); |
efeb6e5c276d
Make Application::Start/Stop times relative, Simulator::StopAt(time) renamed to Simulator::Stop(time) and time also made relative, to improve consistency of the API which uses relative times everywhere else. Closes bug #191.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
2725
diff
changeset
|
66 |
virtual ~Application (); |
346
4a76f247e7dc
Add random number files, base class Application
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
67 |
|
538
3cc417842b5f
Added/fixed some doxygen
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
524
diff
changeset
|
68 |
/** |
3cc417842b5f
Added/fixed some doxygen
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
524
diff
changeset
|
69 |
* \brief Specify application start time |
3174
efeb6e5c276d
Make Application::Start/Stop times relative, Simulator::StopAt(time) renamed to Simulator::Stop(time) and time also made relative, to improve consistency of the API which uses relative times everywhere else. Closes bug #191.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
2725
diff
changeset
|
70 |
* \param startTime Start time for this application, |
efeb6e5c276d
Make Application::Start/Stop times relative, Simulator::StopAt(time) renamed to Simulator::Stop(time) and time also made relative, to improve consistency of the API which uses relative times everywhere else. Closes bug #191.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
2725
diff
changeset
|
71 |
* relative to the current simulation time. |
538
3cc417842b5f
Added/fixed some doxygen
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
524
diff
changeset
|
72 |
* |
3cc417842b5f
Added/fixed some doxygen
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
524
diff
changeset
|
73 |
* Applications start at various times in the simulation scenario. |
3cc417842b5f
Added/fixed some doxygen
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
524
diff
changeset
|
74 |
* The Start method specifies when the application should be |
3cc417842b5f
Added/fixed some doxygen
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
524
diff
changeset
|
75 |
* started. The application subclasses should override the |
3cc417842b5f
Added/fixed some doxygen
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
524
diff
changeset
|
76 |
* private "StartApplication" method defined below, which is called at the |
3cc417842b5f
Added/fixed some doxygen
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
524
diff
changeset
|
77 |
* time specified, to cause the application to begin. |
3cc417842b5f
Added/fixed some doxygen
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
524
diff
changeset
|
78 |
*/ |
3174
efeb6e5c276d
Make Application::Start/Stop times relative, Simulator::StopAt(time) renamed to Simulator::Stop(time) and time also made relative, to improve consistency of the API which uses relative times everywhere else. Closes bug #191.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
2725
diff
changeset
|
79 |
void Start (const Time& startTime); |
346
4a76f247e7dc
Add random number files, base class Application
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
80 |
|
593
90cf12cb4ab7
merge with trunk
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
538
diff
changeset
|
81 |
/** |
90cf12cb4ab7
merge with trunk
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
538
diff
changeset
|
82 |
* \brief Specify application start time. |
90cf12cb4ab7
merge with trunk
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
538
diff
changeset
|
83 |
* \param startVariable the random variable to use to pick |
3174
efeb6e5c276d
Make Application::Start/Stop times relative, Simulator::StopAt(time) renamed to Simulator::Stop(time) and time also made relative, to improve consistency of the API which uses relative times everywhere else. Closes bug #191.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
2725
diff
changeset
|
84 |
* the real start time as a relative time, in units of |
efeb6e5c276d
Make Application::Start/Stop times relative, Simulator::StopAt(time) renamed to Simulator::Stop(time) and time also made relative, to improve consistency of the API which uses relative times everywhere else. Closes bug #191.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
2725
diff
changeset
|
85 |
* seconds, relative to the current simulation time. |
538
3cc417842b5f
Added/fixed some doxygen
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
524
diff
changeset
|
86 |
*/ |
3174
efeb6e5c276d
Make Application::Start/Stop times relative, Simulator::StopAt(time) renamed to Simulator::Stop(time) and time also made relative, to improve consistency of the API which uses relative times everywhere else. Closes bug #191.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
2725
diff
changeset
|
87 |
void Start (const RandomVariable& startVariable); |
346
4a76f247e7dc
Add random number files, base class Application
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
88 |
|
538
3cc417842b5f
Added/fixed some doxygen
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
524
diff
changeset
|
89 |
/** |
3cc417842b5f
Added/fixed some doxygen
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
524
diff
changeset
|
90 |
* \brief Specify application stop time |
593
90cf12cb4ab7
merge with trunk
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
538
diff
changeset
|
91 |
* \param stopTime Stop time for this application, relative to the |
3174
efeb6e5c276d
Make Application::Start/Stop times relative, Simulator::StopAt(time) renamed to Simulator::Stop(time) and time also made relative, to improve consistency of the API which uses relative times everywhere else. Closes bug #191.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
2725
diff
changeset
|
92 |
* current simulation time. |
538
3cc417842b5f
Added/fixed some doxygen
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
524
diff
changeset
|
93 |
* |
3cc417842b5f
Added/fixed some doxygen
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
524
diff
changeset
|
94 |
* Once an application has started, it is sometimes useful |
3cc417842b5f
Added/fixed some doxygen
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
524
diff
changeset
|
95 |
* to stop the application. The Stop method specifies when an |
3cc417842b5f
Added/fixed some doxygen
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
524
diff
changeset
|
96 |
* application is to stop. The application subclasses should override |
593
90cf12cb4ab7
merge with trunk
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
538
diff
changeset
|
97 |
* the private StopApplication method, to be notified when that |
90cf12cb4ab7
merge with trunk
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
538
diff
changeset
|
98 |
* time has come. |
538
3cc417842b5f
Added/fixed some doxygen
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
524
diff
changeset
|
99 |
*/ |
3174
efeb6e5c276d
Make Application::Start/Stop times relative, Simulator::StopAt(time) renamed to Simulator::Stop(time) and time also made relative, to improve consistency of the API which uses relative times everywhere else. Closes bug #191.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
2725
diff
changeset
|
100 |
void Stop (const Time& stopTime); |
346
4a76f247e7dc
Add random number files, base class Application
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
101 |
|
538
3cc417842b5f
Added/fixed some doxygen
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
524
diff
changeset
|
102 |
/** |
593
90cf12cb4ab7
merge with trunk
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
538
diff
changeset
|
103 |
* \brief Specify application stop time |
90cf12cb4ab7
merge with trunk
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
538
diff
changeset
|
104 |
* \param stopVariable the random variable to use to pick |
90cf12cb4ab7
merge with trunk
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
538
diff
changeset
|
105 |
* the real stop time, in units of seconds, |
3174
efeb6e5c276d
Make Application::Start/Stop times relative, Simulator::StopAt(time) renamed to Simulator::Stop(time) and time also made relative, to improve consistency of the API which uses relative times everywhere else. Closes bug #191.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
2725
diff
changeset
|
106 |
* relative to the current simulation time. |
538
3cc417842b5f
Added/fixed some doxygen
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
524
diff
changeset
|
107 |
*/ |
3174
efeb6e5c276d
Make Application::Start/Stop times relative, Simulator::StopAt(time) renamed to Simulator::Stop(time) and time also made relative, to improve consistency of the API which uses relative times everywhere else. Closes bug #191.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
2725
diff
changeset
|
108 |
void Stop (const RandomVariable& stopVariable); |
346
4a76f247e7dc
Add random number files, base class Application
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
109 |
|
538
3cc417842b5f
Added/fixed some doxygen
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
524
diff
changeset
|
110 |
/** |
728
95c426b1cb60
rename INode to Node
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
607
diff
changeset
|
111 |
* \returns the Node to which this Application object is attached. |
538
3cc417842b5f
Added/fixed some doxygen
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
524
diff
changeset
|
112 |
*/ |
3174
efeb6e5c276d
Make Application::Start/Stop times relative, Simulator::StopAt(time) renamed to Simulator::Stop(time) and time also made relative, to improve consistency of the API which uses relative times everywhere else. Closes bug #191.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
2725
diff
changeset
|
113 |
Ptr<Node> GetNode () const; |
2600
6c389d0c717d
add Application::SetNode and NetDevice::SetNode, use them from Node::AddApplication and Node::AddDevice. kill useless "Node" attributes.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2494
diff
changeset
|
114 |
|
2725 | 115 |
/** |
116 |
* \param node the node to which this Application object is attached. |
|
117 |
*/ |
|
2600
6c389d0c717d
add Application::SetNode and NetDevice::SetNode, use them from Node::AddApplication and Node::AddDevice. kill useless "Node" attributes.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2494
diff
changeset
|
118 |
void SetNode (Ptr<Node> node); |
346
4a76f247e7dc
Add random number files, base class Application
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
119 |
|
593
90cf12cb4ab7
merge with trunk
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
538
diff
changeset
|
120 |
private: |
90cf12cb4ab7
merge with trunk
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
538
diff
changeset
|
121 |
/** |
90cf12cb4ab7
merge with trunk
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
538
diff
changeset
|
122 |
* \brief Application specific startup code |
90cf12cb4ab7
merge with trunk
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
538
diff
changeset
|
123 |
* |
90cf12cb4ab7
merge with trunk
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
538
diff
changeset
|
124 |
* The StartApplication method is called at the start time specifed by Start |
90cf12cb4ab7
merge with trunk
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
538
diff
changeset
|
125 |
* This method should be overridden by all or most application |
90cf12cb4ab7
merge with trunk
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
538
diff
changeset
|
126 |
* subclasses. |
90cf12cb4ab7
merge with trunk
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
538
diff
changeset
|
127 |
*/ |
90cf12cb4ab7
merge with trunk
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
538
diff
changeset
|
128 |
virtual void StartApplication (void); |
346
4a76f247e7dc
Add random number files, base class Application
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
129 |
|
593
90cf12cb4ab7
merge with trunk
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
538
diff
changeset
|
130 |
/** |
90cf12cb4ab7
merge with trunk
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
538
diff
changeset
|
131 |
* \brief Application specific shutdown code |
90cf12cb4ab7
merge with trunk
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
538
diff
changeset
|
132 |
* |
90cf12cb4ab7
merge with trunk
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
538
diff
changeset
|
133 |
* The StopApplication method is called at the stop time specifed by Stop |
90cf12cb4ab7
merge with trunk
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
538
diff
changeset
|
134 |
* This method should be overridden by all or most application |
90cf12cb4ab7
merge with trunk
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
538
diff
changeset
|
135 |
* subclasses. |
90cf12cb4ab7
merge with trunk
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
538
diff
changeset
|
136 |
*/ |
90cf12cb4ab7
merge with trunk
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
538
diff
changeset
|
137 |
virtual void StopApplication (void); |
90cf12cb4ab7
merge with trunk
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
538
diff
changeset
|
138 |
protected: |
517
702e96b8960f
finish Dispose -> DoDispose rework
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
498
diff
changeset
|
139 |
virtual void DoDispose (void); |
346
4a76f247e7dc
Add random number files, base class Application
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
140 |
private: |
593
90cf12cb4ab7
merge with trunk
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
538
diff
changeset
|
141 |
void ScheduleStart (const Time &time); |
90cf12cb4ab7
merge with trunk
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
538
diff
changeset
|
142 |
void ScheduleStop (const Time &time); |
90cf12cb4ab7
merge with trunk
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
538
diff
changeset
|
143 |
|
90cf12cb4ab7
merge with trunk
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
538
diff
changeset
|
144 |
EventId m_startEvent; |
90cf12cb4ab7
merge with trunk
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
538
diff
changeset
|
145 |
EventId m_stopEvent; |
728
95c426b1cb60
rename INode to Node
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
607
diff
changeset
|
146 |
Ptr<Node> m_node; |
346
4a76f247e7dc
Add random number files, base class Application
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
147 |
}; |
4a76f247e7dc
Add random number files, base class Application
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
148 |
|
4a76f247e7dc
Add random number files, base class Application
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
149 |
} //namespace ns3 |
4a76f247e7dc
Add random number files, base class Application
Tom Henderson <tomh@tomh.org>
parents:
diff
changeset
|
150 |
#endif |