Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes

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 SetStartTime (Time start)
 Specify application start time.
void SetStopTime (Time stop)
 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)
virtual void DoStart (void)

Protected Attributes

Ptr< Nodem_node
Time m_startTime
Time m_stopTime
EventId m_startEvent
EventId m_stopEvent

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.

It is safe to call GetObject from within this method.

Reimplemented from ns3::Object.

Reimplemented in ns3::OnOffApplication, ns3::PacketSink, ns3::Ping6, ns3::Radvd, ns3::UdpClient, ns3::UdpServer, ns3::UdpTraceClient, ns3::UdpEchoClient, and ns3::UdpEchoServer.

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

This method is called only once by Object::Start. If the user calls Object::Start multiple times, DoStart is called only the first time.

Subclasses are expected to override this method and _chain up_ to their parent's implementation once they are done. It is safe to call GetObject and AggregateObject from within this method.

Reimplemented from ns3::Object.

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]
  • /NodeList/[i]/DeviceList/[i]/$ns3::AlohaNoackNetDevice/Phy/$ns3::Application
  • /NodeList/[i]/DeviceList/[i]/$ns3::BaseStationNetDevice/BsIpcsPacketClassifier/$ns3::Application
  • /NodeList/[i]/DeviceList/[i]/$ns3::BaseStationNetDevice/LinkManager/$ns3::Application
  • /NodeList/[i]/DeviceList/[i]/$ns3::BaseStationNetDevice/SSManager/$ns3::Application
  • /NodeList/[i]/DeviceList/[i]/$ns3::BaseStationNetDevice/ServiceFlowManager/$ns3::Application
  • /NodeList/[i]/DeviceList/[i]/$ns3::NonCommunicatingNetDevice/Phy/$ns3::Application
  • /NodeList/[i]/DeviceList/[i]/$ns3::SubscriberStationNetDevice/Classifier/$ns3::Application
  • /NodeList/[i]/DeviceList/[i]/$ns3::SubscriberStationNetDevice/LinkManager/$ns3::Application
  • /NodeList/[i]/DeviceList/[i]/$ns3::SubscriberStationNetDevice/SSScheduler/$ns3::Application
  • /NodeList/[i]/DeviceList/[i]/$ns3::UanNetDevice/Channel/NoiseModel/$ns3::Application
  • /NodeList/[i]/DeviceList/[i]/$ns3::UanNetDevice/Channel/PropagationModel/$ns3::Application
  • /NodeList/[i]/DeviceList/[i]/$ns3::UanNetDevice/Mac/$ns3::Application
  • /NodeList/[i]/DeviceList/[i]/$ns3::UanNetDevice/Phy/$ns3::Application
  • /NodeList/[i]/DeviceList/[i]/$ns3::UanNetDevice/Transducer/$ns3::Application
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::BaseStationNetDevice/BsIpcsPacketClassifier/$ns3::Application
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::BaseStationNetDevice/LinkManager/$ns3::Application
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::BaseStationNetDevice/SSManager/$ns3::Application
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::BaseStationNetDevice/ServiceFlowManager/$ns3::Application
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::SubscriberStationNetDevice/Classifier/$ns3::Application
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::SubscriberStationNetDevice/LinkManager/$ns3::Application
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::SubscriberStationNetDevice/SSScheduler/$ns3::Application
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/BandwidthManager/$ns3::Application
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/BurstProfileManager/$ns3::Application
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/Channel/$ns3::UanChannel/NoiseModel/$ns3::Application
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/Channel/$ns3::UanChannel/PropagationModel/$ns3::Application
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/ConnectionManager/$ns3::Application
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/Phy/Channel/$ns3::UanChannel/NoiseModel/$ns3::Application
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/Phy/Channel/$ns3::UanChannel/PropagationModel/$ns3::Application

Attributes defined for this type:

  • StartTime: Time at which the application will start
    • Set with class: TimeValue
    • Underlying type: Time
    • Initial value: 0ns
    • Flags: construct write read
  • StopTime: Time at which the application will stop
    • Set with class: TimeValue
    • Underlying type: Time
    • Initial value: 0ns
    • Flags: construct write read

No TraceSources defined for this type.

Reimplemented from ns3::Object.

Reimplemented in ns3::OnOffApplication, ns3::PacketSink, ns3::Ping6, ns3::Radvd, ns3::UdpClient, ns3::UdpServer, ns3::UdpTraceClient, ns3::UdpEchoClient, ns3::UdpEchoServer, and ns3::V4Ping.

void ns3::Application::SetNode ( Ptr< Node node  ) 
Parameters:
node the node to which this Application object is attached.
void ns3::Application::SetStartTime ( Time  start  ) 

Specify application start time.

Parameters:
start 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.

void ns3::Application::SetStopTime ( Time  stop  ) 

Specify application stop time.

Parameters:
stop 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.


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