src/node/application.h
author Tom Henderson <tomh@tomh.org>
Mon, 02 Jun 2008 21:21:16 -0700
changeset 3194 79dba133b5f8
parent 3183 fc3b2e03e61e
child 3222 f61c17b62fd1
permissions -rw-r--r--
update RELEASE_NOTES and a few other files
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
/**
3183
fc3b2e03e61e more doxygen
Tom Henderson <tomh@tomh.org>
parents: 3174
diff changeset
    36
 * \ingroup node
3194
79dba133b5f8 update RELEASE_NOTES and a few other files
Tom Henderson <tomh@tomh.org>
parents: 3183
diff changeset
    37
 * \defgroup application Application
3183
fc3b2e03e61e more doxygen
Tom Henderson <tomh@tomh.org>
parents: 3174
diff changeset
    38
 *
538
3cc417842b5f Added/fixed some doxygen
Raj Bhattacharjea <raj.b@gatech.edu>
parents: 524
diff changeset
    39
 * \brief The base class for all ns3 applicationes
3cc417842b5f Added/fixed some doxygen
Raj Bhattacharjea <raj.b@gatech.edu>
parents: 524
diff changeset
    40
 * 
3cc417842b5f Added/fixed some doxygen
Raj Bhattacharjea <raj.b@gatech.edu>
parents: 524
diff changeset
    41
 * Class Application is the base class for all ns3 applications.
593
90cf12cb4ab7 merge with trunk
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 538
diff changeset
    42
 * Applications are associated with individual nodes.
538
3cc417842b5f Added/fixed some doxygen
Raj Bhattacharjea <raj.b@gatech.edu>
parents: 524
diff changeset
    43
 * 
3cc417842b5f Added/fixed some doxygen
Raj Bhattacharjea <raj.b@gatech.edu>
parents: 524
diff changeset
    44
 * Conceptually, an application has zero or more Socket
3cc417842b5f Added/fixed some doxygen
Raj Bhattacharjea <raj.b@gatech.edu>
parents: 524
diff changeset
    45
 * 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
    46
 * creation API of the Kernel capability.  The Socket object
3cc417842b5f Added/fixed some doxygen
Raj Bhattacharjea <raj.b@gatech.edu>
parents: 524
diff changeset
    47
 * API is modeled after the
3cc417842b5f Added/fixed some doxygen
Raj Bhattacharjea <raj.b@gatech.edu>
parents: 524
diff changeset
    48
 * well-known BSD sockets interface, although it is somewhat 
3cc417842b5f Added/fixed some doxygen
Raj Bhattacharjea <raj.b@gatech.edu>
parents: 524
diff changeset
    49
 * 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
    50
 * would normally "block" in normal sockets will return immediately
3cc417842b5f Added/fixed some doxygen
Raj Bhattacharjea <raj.b@gatech.edu>
parents: 524
diff changeset
    51
 * 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
    52
 * 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
    53
 * in more detail Socket class in socket.h.
3cc417842b5f Added/fixed some doxygen
Raj Bhattacharjea <raj.b@gatech.edu>
parents: 524
diff changeset
    54
 */
498
5d5fe14d5751 make capabilities and sockets refcounted
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 497
diff changeset
    55
class Application : public Object
5d5fe14d5751 make capabilities and sockets refcounted
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 497
diff changeset
    56
{
346
4a76f247e7dc Add random number files, base class Application
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    57
public:
2494
1c69ea12779c port Applications to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 729
diff changeset
    58
  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
    59
  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
    60
  virtual ~Application ();
346
4a76f247e7dc Add random number files, base class Application
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    61
  
538
3cc417842b5f Added/fixed some doxygen
Raj Bhattacharjea <raj.b@gatech.edu>
parents: 524
diff changeset
    62
  /**
3cc417842b5f Added/fixed some doxygen
Raj Bhattacharjea <raj.b@gatech.edu>
parents: 524
diff changeset
    63
   * \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
    64
   * \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
    65
   *        relative to the current simulation time.
538
3cc417842b5f Added/fixed some doxygen
Raj Bhattacharjea <raj.b@gatech.edu>
parents: 524
diff changeset
    66
   *
3cc417842b5f Added/fixed some doxygen
Raj Bhattacharjea <raj.b@gatech.edu>
parents: 524
diff changeset
    67
   * Applications start at various times in the simulation scenario.
3cc417842b5f Added/fixed some doxygen
Raj Bhattacharjea <raj.b@gatech.edu>
parents: 524
diff changeset
    68
   * The Start method specifies when the application should be
3cc417842b5f Added/fixed some doxygen
Raj Bhattacharjea <raj.b@gatech.edu>
parents: 524
diff changeset
    69
   * started.  The application subclasses should override the
3cc417842b5f Added/fixed some doxygen
Raj Bhattacharjea <raj.b@gatech.edu>
parents: 524
diff changeset
    70
   * 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
    71
   * time specified, to cause the application to begin.
3cc417842b5f Added/fixed some doxygen
Raj Bhattacharjea <raj.b@gatech.edu>
parents: 524
diff changeset
    72
   */
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
    73
  void Start (const Time& startTime);
346
4a76f247e7dc Add random number files, base class Application
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    74
593
90cf12cb4ab7 merge with trunk
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 538
diff changeset
    75
  /** 
90cf12cb4ab7 merge with trunk
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 538
diff changeset
    76
   * \brief Specify application start time.
90cf12cb4ab7 merge with trunk
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 538
diff changeset
    77
   * \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
    78
   *        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
    79
   *        seconds, relative to the current simulation time.
538
3cc417842b5f Added/fixed some doxygen
Raj Bhattacharjea <raj.b@gatech.edu>
parents: 524
diff changeset
    80
   */
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
    81
  void Start (const RandomVariable& startVariable);
346
4a76f247e7dc Add random number files, base class Application
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    82
  
538
3cc417842b5f Added/fixed some doxygen
Raj Bhattacharjea <raj.b@gatech.edu>
parents: 524
diff changeset
    83
  /**
3cc417842b5f Added/fixed some doxygen
Raj Bhattacharjea <raj.b@gatech.edu>
parents: 524
diff changeset
    84
   * \brief Specify application stop time
593
90cf12cb4ab7 merge with trunk
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 538
diff changeset
    85
   * \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
    86
   *        current simulation time.
538
3cc417842b5f Added/fixed some doxygen
Raj Bhattacharjea <raj.b@gatech.edu>
parents: 524
diff changeset
    87
   *
3cc417842b5f Added/fixed some doxygen
Raj Bhattacharjea <raj.b@gatech.edu>
parents: 524
diff changeset
    88
   * Once an application has started, it is sometimes useful
3cc417842b5f Added/fixed some doxygen
Raj Bhattacharjea <raj.b@gatech.edu>
parents: 524
diff changeset
    89
   * 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
    90
   * 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
    91
   * the private StopApplication method, to be notified when that
90cf12cb4ab7 merge with trunk
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 538
diff changeset
    92
   * time has come.
538
3cc417842b5f Added/fixed some doxygen
Raj Bhattacharjea <raj.b@gatech.edu>
parents: 524
diff changeset
    93
   */
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
    94
  void Stop (const Time& stopTime);
346
4a76f247e7dc Add random number files, base class Application
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    95
538
3cc417842b5f Added/fixed some doxygen
Raj Bhattacharjea <raj.b@gatech.edu>
parents: 524
diff changeset
    96
  /**
593
90cf12cb4ab7 merge with trunk
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 538
diff changeset
    97
   * \brief Specify application stop time
90cf12cb4ab7 merge with trunk
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 538
diff changeset
    98
   * \param stopVariable the random variable to use to pick
90cf12cb4ab7 merge with trunk
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 538
diff changeset
    99
   *        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
   100
   *        relative to the current simulation time.
538
3cc417842b5f Added/fixed some doxygen
Raj Bhattacharjea <raj.b@gatech.edu>
parents: 524
diff changeset
   101
   */
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
   102
  void Stop (const RandomVariable& stopVariable);
346
4a76f247e7dc Add random number files, base class Application
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   103
538
3cc417842b5f Added/fixed some doxygen
Raj Bhattacharjea <raj.b@gatech.edu>
parents: 524
diff changeset
   104
  /**
728
95c426b1cb60 rename INode to Node
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 607
diff changeset
   105
   * \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
   106
   */
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
   107
  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
   108
2725
67aa4e7c722e doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2600
diff changeset
   109
  /**
67aa4e7c722e doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2600
diff changeset
   110
   * \param node the node to which this Application object is attached.
67aa4e7c722e doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2600
diff changeset
   111
   */
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
   112
  void SetNode (Ptr<Node> node);
346
4a76f247e7dc Add random number files, base class Application
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   113
  
593
90cf12cb4ab7 merge with trunk
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 538
diff changeset
   114
private:
90cf12cb4ab7 merge with trunk
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 538
diff changeset
   115
  /**
90cf12cb4ab7 merge with trunk
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 538
diff changeset
   116
   * \brief Application specific startup code
90cf12cb4ab7 merge with trunk
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 538
diff changeset
   117
   *
90cf12cb4ab7 merge with trunk
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 538
diff changeset
   118
   * 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
   119
   * 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
   120
   * subclasses.
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
  virtual void StartApplication (void);
346
4a76f247e7dc Add random number files, base class Application
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   123
593
90cf12cb4ab7 merge with trunk
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 538
diff changeset
   124
  /**
90cf12cb4ab7 merge with trunk
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 538
diff changeset
   125
   * \brief Application specific shutdown code
90cf12cb4ab7 merge with trunk
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 538
diff changeset
   126
   *
90cf12cb4ab7 merge with trunk
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 538
diff changeset
   127
   * 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
   128
   * 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
   129
   * subclasses.
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
  virtual void StopApplication (void);
90cf12cb4ab7 merge with trunk
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 538
diff changeset
   132
protected:
517
702e96b8960f finish Dispose -> DoDispose rework
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 498
diff changeset
   133
  virtual void DoDispose (void);
346
4a76f247e7dc Add random number files, base class Application
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   134
private:
593
90cf12cb4ab7 merge with trunk
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 538
diff changeset
   135
  void ScheduleStart (const Time &time);
90cf12cb4ab7 merge with trunk
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 538
diff changeset
   136
  void ScheduleStop (const Time &time);
90cf12cb4ab7 merge with trunk
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 538
diff changeset
   137
90cf12cb4ab7 merge with trunk
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 538
diff changeset
   138
  EventId         m_startEvent;
90cf12cb4ab7 merge with trunk
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 538
diff changeset
   139
  EventId         m_stopEvent;
728
95c426b1cb60 rename INode to Node
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 607
diff changeset
   140
  Ptr<Node>       m_node;
346
4a76f247e7dc Add random number files, base class Application
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   141
};
4a76f247e7dc Add random number files, base class Application
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   142
4a76f247e7dc Add random number files, base class Application
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   143
} //namespace ns3
4a76f247e7dc Add random number files, base class Application
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   144
#endif