ns3::Application Class Reference

The base class for all ns3 applications. More...

#include <application.h>

Inheritance diagram for ns3::Application:

Inheritance graph
[legend]
Collaboration diagram for ns3::Application:

Collaboration graph
[legend]

List of all members.

Public Member Functions

void Start (const Time &startTime)
 Specify application start time.
void Start (const RandomVariable &startVariable)
 Specify application start time.
void Stop (const Time &stopTime)
 Specify application stop time.
void Stop (const RandomVariable &stopVariable)
 Specify application stop time.
Ptr< NodeGetNode () const
void SetNode (Ptr< Node > node)

Static Public Member Functions

static TypeId GetTypeId (void)
 This method returns the TypeId associated to ns3::Application.

Protected Member Functions

virtual void DoDispose (void)

Private Member Functions

virtual void StartApplication (void)
 Application specific startup code.
virtual void StopApplication (void)
 Application specific shutdown code.


Detailed Description

The base class for all ns3 applications.

Member Function Documentation

virtual void ns3::Application::DoDispose ( void   )  [protected, virtual]

This method is called by Object::Dispose or by the object's destructor, whichever comes first.

Subclasses are expected to implement their real destruction code in an overriden version of this method and chain up to their parent's implementation once they are done. i.e., for simplicity, the destructor of every subclass should be empty and its content should be moved to the associated DoDispose method.

Reimplemented from ns3::Object.

Reimplemented in ns3::OnOffApplication, ns3::PacketSink, ns3::UdpEchoClient, ns3::UdpEchoServer, and ns3::rapidnet::RapidNetApplicationBase.

Ptr<Node> ns3::Application::GetNode (  )  const

Returns:
the Node to which this Application object is attached.

static TypeId ns3::Application::GetTypeId ( void   )  [static]

This method returns the TypeId associated to ns3::Application.

This object is accessible through the following paths with Config::Set and Config::Connect:

  • /NodeList/[i]/ApplicationList/[i]
No Attributes defined for this type.
No TraceSources defined for this type.

Reimplemented from ns3::Object.

Reimplemented in ns3::OnOffApplication, ns3::PacketSink, ns3::UdpEchoClient, ns3::UdpEchoServer, and ns3::rapidnet::RapidNetApplicationBase.

void ns3::Application::SetNode ( Ptr< Node node  ) 

Parameters:
node the node to which this Application object is attached.

void ns3::Application::Start ( const RandomVariable startVariable  ) 

Specify application start time.

Parameters:
startVariable the random variable to use to pick the real start time as a relative time, in units of seconds, relative to the current simulation time.

void ns3::Application::Start ( const Time startTime  ) 

Specify application start time.

Parameters:
startTime Start time for this application, relative to the current simulation time.
Applications start at various times in the simulation scenario. The Start method specifies when the application should be started. The application subclasses should override the private "StartApplication" method defined below, which is called at the time specified, to cause the application to begin.

virtual void ns3::Application::StartApplication ( void   )  [private, virtual]

Application specific startup code.

The StartApplication method is called at the start time specifed by Start This method should be overridden by all or most application subclasses.

Reimplemented in ns3::OnOffApplication, ns3::PacketSink, ns3::UdpEchoClient, ns3::UdpEchoServer, and ns3::rapidnet::RapidNetApplicationBase.

void ns3::Application::Stop ( const RandomVariable stopVariable  ) 

Specify application stop time.

Parameters:
stopVariable the random variable to use to pick the real stop time, in units of seconds, relative to the current simulation time.

void ns3::Application::Stop ( const Time stopTime  ) 

Specify application stop time.

Parameters:
stopTime Stop time for this application, relative to the current simulation time.
Once an application has started, it is sometimes useful to stop the application. The Stop method specifies when an application is to stop. The application subclasses should override the private StopApplication method, to be notified when that time has come.

virtual void ns3::Application::StopApplication ( void   )  [private, virtual]

Application specific shutdown code.

The StopApplication method is called at the stop time specifed by Stop This method should be overridden by all or most application subclasses.

Reimplemented in ns3::OnOffApplication, ns3::PacketSink, ns3::UdpEchoClient, ns3::UdpEchoServer, and ns3::rapidnet::RapidNetApplicationBase.


The documentation for this class was generated from the following files:

Generated on Fri Apr 9 15:01:10 2010 for NS-3 by  doxygen 1.5.8